Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • This project
    • Loading...
  • Sign in / Register
SRB2
SRB2
  • Project
    • Overview
    • Details
    • Activity
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 264
    • Issues 264
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 82
    • Merge Requests 82
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • STJr
  • SRB2SRB2
  • Merge Requests
  • !1074

Closed
Opened Jul 18, 2020 by SteelT@SteelTitanium 
  • Report abuse
Report abuse

Fix musintername and muspostbossname sometimes returning garbage.

Fixes #197 (closed)

  • Discussion 2
  • Commits 1
  • Changes 2
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • James R.
    @james started a discussion on the diff Jul 18, 2020
    src/dehacked.c
    1777 1777 else if (fastcmp(word, "MUSICINTERFADEOUT"))
    1778 1778 mapheaderinfo[num-1]->musinterfadeout = (UINT32)get_number(word2);
    1779 1779 else if (fastcmp(word, "MUSICINTER"))
    1780 {
    1780 1781 deh_strlcpy(mapheaderinfo[num-1]->musintername, word2,
    1781 1782 sizeof(mapheaderinfo[num-1]->musintername), va("Level header %d: intermission music", num));
    1782 else if (fastcmp(word, "MUSICPOSTBOSS"))
    1783 mapheaderinfo[num-1]->musintername[6] = 0;
    • James R. @james commented Jul 18, 2020
      Owner

      These lines after deh_strlcpy should be unnecessary. It looks like the issue was just the wrong byte set on muspostbossname. The issue's example was little hard to read, so I went to confirm it:

      musname:         GFZ1
      musintername:    
      muspostboosname: 
      musname:         GFZ2
      musintername:    
      muspostboosname: ZA
      musname:         VSBOSS
      musintername:    
      muspostboosname: GFZ1
      musname:         THZ1
      musintername:    
      muspostboosname: e
      musname:         THZ2
      musintername:    
      muspostboosname: ot
      musname:         VSBOSS
      musintername:    
      muspostboosname: THZ2

      This is just a sample, but musintername never printed garbage.

      These lines after `deh_strlcpy` should be unnecessary. It looks like the issue was just the wrong byte set on `muspostbossname`. The issue's example was little hard to read, so I went to confirm it: ``` musname: GFZ1 musintername: muspostboosname: musname: GFZ2 musintername: muspostboosname: ZA musname: VSBOSS musintername: muspostboosname: GFZ1 musname: THZ1 musintername: muspostboosname: e musname: THZ2 musintername: muspostboosname: ot musname: VSBOSS musintername: muspostboosname: THZ2 ``` This is just a sample, but `musintername` never printed garbage.
    Please register or sign in to reply
  • SteelT @SteelTitanium

    closed

    Jul 19, 2020

    closed

    closed
    Toggle commit list
  • SteelT @SteelTitanium commented Jul 19, 2020
    Owner

    This was closed to not pollute the history with unnecessary commits, see !1076 (merged) for the proper fix.

    This was closed to not pollute the history with unnecessary commits, see !1076 for the proper fix.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
No assignee
Assign to
2.2.7
Milestone
2.2.7
Assign milestone
Time tracking
1
Labels
Bug
Assign labels
  • View project labels
Reference: STJr/SRB2!1074