Browse Source

Fix bug casting utf8 constants to longer lengths

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 13 years ago
parent
commit
852a0c5bfc
1 changed files with 1 additions and 2 deletions
  1. 1 2
      common/deftype/defvalue.cpp

+ 1 - 2
common/deftype/defvalue.cpp

@@ -1167,8 +1167,7 @@ IValue * createUtf8Value(size32_t len, const char * text, ITypeInfo * type)
         return createUtf8Value(text, type);
 
     rtlDataAttr buff(nlen * 4);
-    unsigned bufflen = 0;
-    rtlUtf8SubStrFT(bufflen, buff.getstr(), len, text, 1, nlen);
+    rtlUtf8SubStrFT(nlen, buff.getstr(), len, text, 1, nlen);
     return new Utf8Value(buff.getstr(), type);
 }