X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Foperations.def;h=d78827a8da8aaf933dc3d6fc2be09774ba39b9f7;hb=729b96a6bd9342c45e6f65a113fd87c70da85b0a;hp=2d31bd47182dcb158d9f9c50e644fb03bb7b07bf;hpb=7fbfc32fc3c636959b0a25b3e76609f86519e84a;p=pspp-builds.git diff --git a/src/language/expressions/operations.def b/src/language/expressions/operations.def index 2d31bd47..d78827a8 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, "no-such-encoding", f); + dst = alloc_string (e, strlen (s)); + strcpy (dst.string, s); + free (s); return dst; }