projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
data_out function to dynamically allocate return value.
[pspp-builds.git]
/
src
/
language
/
expressions
/
operations.def
diff --git
a/src/language/expressions/operations.def
b/src/language/expressions/operations.def
index 2d31bd47182dcb158d9f9c50e644fb03bb7b07bf..db71d2770339db273fa5114fe456afb83f106411 100644
(file)
--- 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;
{
union value v;
struct substring dst;
+ char *s;
v.f = x;
v.f = x;
- dst = alloc_string (e, f->w);
+
assert (!fmt_is_string (f->type));
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;
}
return dst;
}