Make xdprval() oops on bad argument
This commit is contained in:
parent
f3e9526472
commit
d3345ce66c
1 changed files with 9 additions and 1 deletions
|
@ -106,12 +106,20 @@ xdeval(struct valstr *val,
|
|||
return val; /* FIXME nstr_exec_val() should return VAL */
|
||||
}
|
||||
|
||||
/* Dump VAL prefixed with SEP, return " ". */
|
||||
/*
|
||||
* Dump VAL prefixed with SEP, return " ".
|
||||
* VAL must be evaluated.
|
||||
*/
|
||||
static char *
|
||||
xdprval(struct valstr *val, char *sep)
|
||||
{
|
||||
unsigned char *s, *e, *l;
|
||||
|
||||
if (CANT_HAPPEN(val->val_cat != NSC_VAL)) {
|
||||
pr("%snil", sep);
|
||||
return " ";
|
||||
}
|
||||
|
||||
switch (val->val_type) {
|
||||
case NSC_LONG:
|
||||
pr("%s%ld", sep, val->val_as.lng);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue