paranoid check that RNA string functions set the string, would have helped solve keymap search bug.
disabled in release mode.
This commit is contained in:
@@ -2216,8 +2216,17 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fi
|
||||
else
|
||||
buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
|
||||
|
||||
#ifndef NDEBUG
|
||||
/* safety check to ensure the string is actually set */
|
||||
buf[length]= 255;
|
||||
#endif
|
||||
|
||||
RNA_property_string_get(ptr, prop, buf);
|
||||
|
||||
#ifndef NDEBUG
|
||||
BLI_assert(buf[length] == '\0');
|
||||
#endif
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user