diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c index 46da87580..a962f850c 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2076,8 +2076,11 @@ setstrvalue(Value v, char *val) } if (v->start > zlen) v->start = zlen; - if (v->end < 0) + if (v->end < 0) { v->end += zlen + 1; + if (v->end < 0) + v->end = 0; + } else if (v->end > zlen) v->end = zlen; x = (char *) zalloc(v->start + strlen(val) + zlen - v->end + 1); |