Add some assertions around use of Tell

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-16 19:38:48 +00:00
commit 3d6b068b8c
2 changed files with 2 additions and 0 deletions

View file

@ -76,6 +76,7 @@ static DOH *encode(char *name, DOH *s) {
Seek(s, 0, SEEK_SET);
fn = (DOH *(*)(DOH *)) Data(handle);
ns = (*fn) (s);
assert(pos != -1);
Seek(s, pos, SEEK_SET);
if (tmp)
Delete(tmp);

View file

@ -583,6 +583,7 @@ static List *find_args(String *s, int ismacro, String *macro_name) {
c = Getc(s);
if (c != '(') {
/* Not a macro, bail out now! */
assert(pos != -1);
Seek(s, pos, SEEK_SET);
Delete(args);
return 0;