tool_lib.c: ensure output string is always set

Ensure that val2str always writes to its output buffer,
which is static and shared between all PVs.
Should make bugs like lp:1418526 more obvious.
This commit is contained in:
Michael Davidsaver
2015-02-17 10:45:30 -05:00
parent 2e4d8b31ff
commit 2f0e9172a4

View File

@@ -120,6 +120,7 @@ char *val2str (const void *v, unsigned type, int index)
strcpy (str, "*** invalid type");
return str;
}
strcpy (str, "!!!");
base_type = type % (LAST_TYPE+1);