[svn:parrot] r46980 - trunk/src/string
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue May 25 02:46:18 UTC 2010
Author: bacek
Date: Tue May 25 02:46:17 2010
New Revision: 46980
URL: https://trac.parrot.org/parrot/changeset/46980
Log:
Adjust assert in Parrot_str_join to avoid false positive on buffer exhausting.
Modified:
trunk/src/string/api.c
Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c Tue May 25 02:32:55 2010 (r46979)
+++ trunk/src/string/api.c Tue May 25 02:46:17 2010 (r46980)
@@ -3242,7 +3242,8 @@
mem_sys_memcopy(pos, next->strstart, next->bufused);
pos += next->bufused;
- PARROT_ASSERT(pos <= res->strstart + Buffer_buflen(res));
+ /* We can consume all buffer and pos will be next-after-end of buffer */
+ PARROT_ASSERT(pos <= res->strstart + Buffer_buflen(res) + 1);
}
res->bufused = pos - res->strstart;
More information about the parrot-commits
mailing list