ape
ape copied to clipboard
Should `object_make_string` check for NULL input string?
Currently, I get a crash at https://github.com/kgabis/ape/blob/d4a0c5cd2496d2e27feb4d8b6adfc9887cc36c36/ape.c#L10208-L10209 because I sometimes may pass NULL
to the string parameter, and strlen
crashes on NULL
input on Ubuntu 16.04, should this part of code maybe do a check
object_t object_make_string(gcmem_t *mem, const char *string) {
if (string == NULL) {
return object_make_null();
}
int len = (int)strlen(string);
to handle non-expected NULL
gracefully without crashing? :)
Thanks! Ape is great, I'm having a blast with it!
Hi, I will add this next time I change something in ape, for now please add null checks in you code :)
Mind if I ask what are using ape for? And what do you find good or bad in it so far?
I'm currently using it to wrap my C framework so I could prototype 2D and 3D programs faster. Work in progress. :)
I only miss C-like enum
s, other than that it's great so far! :)
Just thought I guess one can emulate enums with code like this for now. :)
const MY_ENUM_VALUE = 42
Released! :tada: :relaxed:
https://github.com/procedural/gamescript
(Game Script also includes my profile library, so it'll be super easy now to profile Ape's perf!)
Fantastic work! Have you considered open sourcing the code?
Fantastic work!
Thank you!
Have you considered open sourcing the code?
No, not really, at least not for now.