diff options
author | Michael Forney <mforney@mforney.org> | 2021-04-14 14:57:01 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-05-02 11:56:52 -0700 |
commit | ab3187e9d02a9e4c3395c28858ac179d1fc5787b (patch) | |
tree | 9365a19767b35e00bfe2e9cfcf5e82fd113f4895 /init.c | |
parent | 197fc75ab9850402b47d79da2e6cde47c8deb7d4 (diff) |
expr: Include NUL-terminator in string expression data
This will facilitate the support of wide-string literals.
Based on patch from Nihal Jere.
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -251,7 +251,7 @@ parseinit(struct scope *s, struct type *t) break; expr = expr->base; if (t->incomplete) - updatearray(t, expr->string.size); + updatearray(t, expr->string.size - 1); goto add; case TYPESTRUCT: case TYPEUNION: |