Skip to content

Commit

Permalink
We need to terminate the chunk version too it seems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kein authored and ManlyMarco committed Sep 19, 2020
1 parent bc68bd5 commit 95104b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FPSCounter/Extensions/FixedString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public static unsafe void CopyIntoString(string dest_string, char[] char_buffer,
for (int i = 0; i < length; i++)
dest_fixed[i] = char_buffer[i];
// NULL terminate the dest string
if (length < dest_string.Length)
dest_fixed[length] = (char)0;
for (int j = length; j < dest_string.Length; j++)
dest_fixed[j] = (char)0;
}
}

Expand Down

0 comments on commit 95104b9

Please sign in to comment.