numparam/mystring.c, fix `pscopy()' and `pscopy_up()'

This commit is contained in:
rlar 2016-04-30 19:24:49 +02:00
parent 6a328ef609
commit db8f8fc062
1 changed files with 2 additions and 6 deletions

View File

@ -246,10 +246,8 @@ pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng)
if (start < stop) { /* nothing! */
if ((start + leng - 1) > stop) {
// leng = stop - start + 1;
if (leng > stop - start)
leng = stop - start;
}
_spice_dstring_setlength(dstr_p, leng);
s_p = spice_dstring_value(dstr_p);
@ -281,10 +279,8 @@ pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng)
if (start < stop) { /* nothing! */
if ((start + leng - 1) > stop) {
// leng = stop - start + 1;
if (leng > stop - start)
leng = stop - start;
}
_spice_dstring_setlength(dstr_p, leng);
s_p = spice_dstring_value(dstr_p);