aboutsummaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/Win32Util.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2022-11-17 15:04:20 +0100
committerPierre Ossman <ossman@cendio.se>2023-02-04 14:03:13 +0100
commit07e541678ca8c55c39780f7960c559a3e9c7ee1e (patch)
tree89f0f53831a9e546e35fdc0cd77451548ffe6874 /win/rfb_win32/Win32Util.cxx
parentd98720b736eb908d63c1ecb3779fc2a3cd9f4914 (diff)
downloadtigervnc-07e541678ca8c55c39780f7960c559a3e9c7ee1e.tar.gz
tigervnc-07e541678ca8c55c39780f7960c559a3e9c7ee1e.zip
Move hex conversion helpers to util
These are used here and there so let's make them more general rather than hiding them in the stream classes.
Diffstat (limited to 'win/rfb_win32/Win32Util.cxx')
-rw-r--r--win/rfb_win32/Win32Util.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/win/rfb_win32/Win32Util.cxx b/win/rfb_win32/Win32Util.cxx
index fc66274f..2fbce0dd 100644
--- a/win/rfb_win32/Win32Util.cxx
+++ b/win/rfb_win32/Win32Util.cxx
@@ -61,13 +61,13 @@ FileVersionInfo::FileVersionInfo(const TCHAR* filename) {
}
const TCHAR* FileVersionInfo::getVerString(const TCHAR* name, DWORD langId) {
- char langIdBuf[sizeof(langId)];
+ uint8_t langIdBuf[sizeof(langId)];
for (int i=sizeof(langIdBuf)-1; i>=0; i--) {
- langIdBuf[i] = (char) (langId & 0xff);
+ langIdBuf[i] = (langId & 0xff);
langId = langId >> 8;
}
- TCharArray langIdStr(rdr::HexOutStream::binToHexStr(langIdBuf, sizeof(langId)));
+ TCharArray langIdStr(binToHex(langIdBuf, sizeof(langId)));
TCharArray infoName(_tcslen(_T("StringFileInfo")) + 4 + _tcslen(name) + _tcslen(langIdStr.buf));
_stprintf(infoName.buf, _T("\\StringFileInfo\\%s\\%s"), langIdStr.buf, name);