Closed cernodile closed 2 years ago
L480: l
should probably be initialized to zero (MSVC) returns warning
Once l
is initialized everything works as expected.
Thanks! Hmm, yeah, iProgramMC is right, under MSVC it doesn't auto-null variables so as is this will causes crashes without adding a l=0. I'm a github moron and couldn't figure out how to modify the pr with that. Can you commit that change to the pull request before I apply it? Or I guess I could fork your PR, then modify it, then apply it, hrm. Never tried that before
Should be fixed.
under MSVC it doesn't auto-null variables so as is this will causes crashes without adding a l=0.
It never does, regardless of compiler
This also fixes several TextScanner functions that depended on it. Tested against gcc and clang on glibc and musl. Also should be quite a bit faster, reduced amount of strlen and sprintf calls.
Behaviour prior to this patch: glibc+gcc /glibc+clang separated string just fine, musl+gcc returned a single letter only Behaviour after this patch: Both glibc and musl return separated string fine.
This shouldn't break MSVC, but I am unable to test that.