diff options
Diffstat (limited to 'win/rfb_win32/Registry.cxx')
-rw-r--r-- | win/rfb_win32/Registry.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index f046188f..cb4e6688 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -175,7 +175,9 @@ TCHAR* RegKey::getString(const TCHAR* valname, const TCHAR* def) const { void RegKey::getBinary(const TCHAR* valname, void** data, size_t* length) const { TCharArray hex(getRepresentation(valname)); - if (!rdr::HexInStream::hexStrToBin(CStr(hex.buf), (char**)data, length)) + *data = hexToBin(CStr(hex.buf), strlen(CStr(hex.buf))); + *length = strlen(CStr(hex.buf))/2; + if (*data == NULL) throw rdr::Exception("getBinary failed"); } void RegKey::getBinary(const TCHAR* valname, void** data, size_t* length, void* def, size_t deflen) const { @@ -233,7 +235,7 @@ TCHAR* RegKey::getRepresentation(const TCHAR* valname) const { switch (type) { case REG_BINARY: { - TCharArray hex(rdr::HexOutStream::binToHexStr(data.buf, length)); + TCharArray hex(binToHex((const uint8_t*)data.buf, length)); return hex.takeBuf(); } case REG_SZ: |