mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-11-17 01:50:36 +00:00
Half-Life 2 SDK Mirrors
- C++ 94.6%
- C 4.8%
- GLSL 0.3%
- Perl 0.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The POSIX paths of _V_UCS2ToUnicode(), _V_UnicodeToUCS2(),
_V_UCS2ToUTF8() and _V_UTF8ToUCS2() check the result of iconv_open()
with "reinterpret_cast<int>(conv_t) > 0". iconv_open() returns
(iconv_t)-1 on failure, so the check relies on pointers being positive
as an int: it treats a valid descriptor at an address of 2 GiB or more
as a failure. It also doesn't compile where pointers are wider than int:
tier1/strtools.cpp:1414:7: error: cast from pointer to smaller type 'int' loses information
tier1/strtools.cpp:1454:7: error: cast from pointer to smaller type 'int' loses information
tier1/strtools.cpp:1502:7: error: cast from pointer to smaller type 'int' loses information
tier1/strtools.cpp:1547:7: error: cast from pointer to smaller type 'int' loses information
(clang, -m64; gcc: "cast from 'iconv_t' {aka 'void*'} to 'int' loses
precision"). Compare with (iconv_t)-1, as tf2's strtools.cpp does.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
|
||
| common | ||
| devtools | ||
| dx9sdk/utilities | ||
| dx10sdk/Utilities/dx9_30 | ||
| fgdlib | ||
| game | ||
| gcsdk/bin | ||
| lib | ||
| materialsystem | ||
| mathlib | ||
| public | ||
| raytrace | ||
| tier0 | ||
| tier1 | ||
| utils | ||
| vgui2 | ||
| vpc_scripts | ||
| vstdlib | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| createallprojects | ||
| createallprojects.bat | ||
| creategameprojects | ||
| creategameprojects.bat | ||