X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Foperations.def;h=db71d2770339db273fa5114fe456afb83f106411;hb=f15c854d8500105766b2f5666bb62b983ff24f88;hp=2d31bd47182dcb158d9f9c50e644fb03bb7b07bf;hpb=a1efcf97ca2f75f4be6a0389ff2372c03ed2d4e1;p=pspp-builds.git diff --git a/src/language/expressions/operations.def b/src/language/expressions/operations.def index 2d31bd47..db71d277 100644 --- a/src/language/expressions/operations.def +++ b/src/language/expressions/operations.def @@ -582,11 +582,15 @@ absorb_miss string function STRING (x, no_format f) { union value v; struct substring dst; + char *s; v.f = x; - dst = alloc_string (e, f->w); + assert (!fmt_is_string (f->type)); - data_out (&v, f, dst.string); + s = data_out (&v, f); + dst = alloc_string (e, strlen (s)); + strcpy (dst.string, s); + free (s); return dst; }