diff options
Diffstat (limited to 'test/unit/unicode_test.cc')
-rw-r--r-- | test/unit/unicode_test.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/unicode_test.cc b/test/unit/unicode_test.cc index 0824cdd0..ffcc1627 100644 --- a/test/unit/unicode_test.cc +++ b/test/unit/unicode_test.cc @@ -32,7 +32,7 @@ int main (int argc, char *argv[]) // not 0-terminated; copy from 0-terminated int t2len = strlen (t1); - char t2[t2len]; + char *t2 = new char[t2len]; for (int i = 0; i < t2len; i++) t2[i] = t1[i]; @@ -54,5 +54,7 @@ int main (int argc, char *argv[]) printf ("%3d -> U+%04x\n", (int)(s - t2), decodeUtf8(s, t2len - (s - t2))); + delete[] t2; + return 0; } |