You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if fHaveInfo and
(VerLanguageName(GetLanguageCode, Buf, Pred(cBufSize)) > 0) then
Result := Buf;
However the VerLanguageName docs say that if buffer size is too small, the language name is truncated. Also the number of characters written excludes the terminating null.
In practice the buffer used is probably large enough, but still the code is not best practice.
Maybe try something like example 2 from C++ (Cpp) VerLanguageName Examples - but note that the logic needs tweaking regarding buffer sizes.
The text was updated successfully, but these errors were encountered:
In
verinfo/PJVersionInfo.pas
Line 648 in e98dc11
VerLanguageName
is called like this:However the
VerLanguageName
docs say that if buffer size is too small, the language name is truncated. Also the number of characters written excludes the terminating null.In practice the buffer used is probably large enough, but still the code is not best practice.
Maybe try something like example 2 from C++ (Cpp) VerLanguageName Examples - but note that the logic needs tweaking regarding buffer sizes.
The text was updated successfully, but these errors were encountered: