Fix #1450661. String_seek truncating strings.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9420 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6d2a2b630d
commit
3ab253b850
1 changed files with 2 additions and 2 deletions
|
|
@ -453,8 +453,8 @@ String_seek(DOH *so, long offset, int whence)
|
|||
nsp = pos + offset;
|
||||
if (nsp < 0)
|
||||
nsp = 0;
|
||||
if (s->len > 0 && nsp >= s->len)
|
||||
nsp = s->len-1;
|
||||
if (s->len > 0 && nsp > s->len)
|
||||
nsp = s->len;
|
||||
|
||||
inc = (nsp > s->sp) ? 1 : -1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue