Browse Source

Merge pull request #931 from ghalliday/utf8cast

Fix bug casting utf8 constants to longer lengths

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 years ago
parent
commit
f9813b8801
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);
 }