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:
William S Fulton 2006-10-06 21:48:00 +00:00
commit 3ab253b850

View file

@ -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;