diff options
| author | kr.angelov <kr.angelov@gmail.com> | 2012-12-27 21:18:46 +0000 |
|---|---|---|
| committer | kr.angelov <kr.angelov@gmail.com> | 2012-12-27 21:18:46 +0000 |
| commit | cade578d04b7a104723a06beea98895369c85cfc (patch) | |
| tree | e43168fda1471a7e2cc0753c99fff7b970b09d98 /src/runtime/c/gu/string.c | |
| parent | 67380fa39813b954e468cbc62f6c8e780fdd99d0 (diff) | |
bugfix in the strings library from the C runtime
Diffstat (limited to 'src/runtime/c/gu/string.c')
| -rw-r--r-- | src/runtime/c/gu/string.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/c/gu/string.c b/src/runtime/c/gu/string.c index d7e29fafe..526a6871c 100644 --- a/src/runtime/c/gu/string.c +++ b/src/runtime/c/gu/string.c @@ -47,9 +47,8 @@ gu_utf8_string(const uint8_t* buf, size_t sz, GuPool* pool) p = gu_malloc_aligned(pool, 1 + sz, 2); p[0] = (uint8_t) sz; } else { - uint8_t* p = - gu_malloc_prefixed(pool, gu_alignof(size_t), - sizeof(size_t), 1, 1 + sizeof(sz)); + p = gu_malloc_prefixed(pool, gu_alignof(size_t), + sizeof(size_t), 1, 1 + sz); ((size_t*) p)[-1] = sz; p[0] = 0; } |
