Commit: 73452ae588e1cebe44676030fb683c8f7e976dea Author: Campbell Barton Date: Thu May 29 20:25:03 2014 +1000 https://developer.blender.org/rB73452ae588e1cebe44676030fb683c8f7e976dea
BLI_dynstr: add assert to check curlen is correct =================================================================== M source/blender/blenlib/intern/BLI_dynstr.c =================================================================== diff --git a/source/blender/blenlib/intern/BLI_dynstr.c b/source/blender/blenlib/intern/BLI_dynstr.c index 4c712a2..25607d8 100644 --- a/source/blender/blenlib/intern/BLI_dynstr.c +++ b/source/blender/blenlib/intern/BLI_dynstr.c @@ -34,6 +34,7 @@ #include <string.h> #include "MEM_guardedalloc.h" +#include "BLI_utildefines.h" #include "BLI_string.h" #include "BLI_dynstr.h" @@ -237,6 +238,7 @@ void BLI_dynstr_get_cstring_ex(DynStr *ds, char *rets) s += slen; } + BLI_assert((s - rets) == ds->curlen); rets[ds->curlen] = '\0'; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs