New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix three bugs found in issue 20 #22
Fix three bugs found in issue 20 #22
Commits on Oct 15, 2021
-
Needs to copy the final null in DateTimeStrg()
The output of DateTimeStrg() was missing a terminating null. This causes crashes when one tries to includes it later as part of "/* VTT %S compiler %S */".
Configuration menu - View commit details
-
Copy full SHA for f441575 - Browse repository at this point
Copy the full SHA f441575View commit details -
Replace %li with %i in format specifier in TTEngine.cpp, to avoid imp…
…licit casting to long This is a variation of the issue with 32-bit long on Windows. On 64-bit Linux, these %li causes casting to 64-bit types. A negative number becomes a large positive value, 4294967296 + number, and generates "Number too large to be parsed, larger than 32,767" errors, when used with the "-a compile everything" option. %li in other files than TTEngine.cpp applies to user messages, instead, and for now, left unchanged. Part of microsoft#20
Configuration menu - View commit details
-
Copy full SHA for da32770 - Browse repository at this point
Copy the full SHA da32770View commit details -
Replace %s with WIDE_STR_FORMAT, so we can replace it with compiler-s…
…pecific macros later. Done with: sed -i -e 's/L"%s"/WIDE_STR_FORMAT/' *.cpp sed -i -e 's/%s"/" WIDE_STR_FORMAT/g' *.cpp sed -i -e 's/L"%s/WIDE_STR_FORMAT L"/g' *.cpp sed -i -e 's/%s/" WIDE_STR_FORMAT L"/g' *.cpp Except one NARROW_STR_FORMAT. Conflicts: src/TTFont.cpp src/vttcompile.cpp
Configuration menu - View commit details
-
Copy full SHA for 839249d - Browse repository at this point
Copy the full SHA 839249dView commit details -
Use different wide string format specifier, depending on the compiler…
… used Reference: https://docs.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-160 " The arguments that follow the format string are interpreted according to the corresponding type character and the optional size prefix. Conversions for character types char and wchar_t are specified by using c or C, and single-byte and multi-byte or wide character strings are specified by using s or S, depending on which formatting function is being used. Character and string arguments that are specified by using c and s are interpreted as char and char* by printf family functions, or as wchar_t and wchar_t* by wprintf family functions. Character and string arguments that are specified by using C and S are interpreted as wchar_t and wchar_t* by printf family functions, or as char and char* by wprintf family functions. This behavior is Microsoft-specific. Microsoft-specific: The Z type character, and the behavior of the c, C, s, and S type characters when they're used with the printf and wprintf functions, are Microsoft extensions. The ISO C standard uses c and s consistently for narrow characters and strings, and C and S for wide characters and strings, in all formatting functions. " This is the truncated string problem seen in microsoft#20
Configuration menu - View commit details
-
Copy full SHA for cc75c60 - Browse repository at this point
Copy the full SHA cc75c60View commit details -
Replace %hs by NARROW_STR_FORMAT, in line with this group of changes.
Done with: sed -i -e 's/%hs/" NARROW_STR_FORMAT L"/g' *.cpp
Configuration menu - View commit details
-
Copy full SHA for 8cf66f9 - Browse repository at this point
Copy the full SHA 8cf66f9View commit details -
Convert two non-error-message format %li to %i.
Found by: grep -n %li *.cpp | grep -v ErrMsg, | grep -v errMsg, | grep -v error,
Configuration menu - View commit details
-
Copy full SHA for dfc85d1 - Browse repository at this point
Copy the full SHA dfc85d1View commit details