diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-27 16:34:09 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-27 16:34:09 +0200 |
commit | f7534e2524d4b14a457540a987e168bc28f61e5d (patch) | |
tree | 21d4b9a8a80208208fcc30a1b70f7af3879d91f5 /showtodo | |
parent | 4e7c62530a7342e7a71047feca398d6612eeca3a (diff) | |
download | EpisodeBrowser-f7534e2524d4b14a457540a987e168bc28f61e5d.tar.gz |
Fix memory bug.
swprintf_s excepts the NUMBER of characters, not the SIZE of the
buffer. The argument is named sizeOfBuffer in the documentation, but
don't let that fool you (like it did me).
Interestingly enough, this bug causes a crash ONLY when compiling
WITHOUT optimizations (at least on my system). The crash was
introduced in 3a133c4, where I removed the `static' attribute from
tszRating.
I guess the optimizer moves the memory around such that the memory
after the string happens to be unimportant.
Diffstat (limited to 'showtodo')
0 files changed, 0 insertions, 0 deletions