firebird driver: do not assume sizeof(short) == 2

Change-Id: I4b4e6caa34c23baa75a87cf1750dce3ca3ae8aed
This commit is contained in:
Lionel Elie Mamane
2014-01-30 06:10:33 +01:00
parent b065cddb0a
commit a904aa609d

View File

@@ -507,7 +507,7 @@ OUString OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT
{
// First 2 bytes are a short containing the length of the string
// No idea if sqllen is still valid here?
short aLength = *((short*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
sal_uInt16 aLength = *((sal_uInt16*) m_pSqlda->sqlvar[nColumnIndex-1].sqldata);
return OUString(m_pSqlda->sqlvar[nColumnIndex-1].sqldata + 2,
aLength,
RTL_TEXTENCODING_UTF8);