septag / rizz

Small C game development framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lt comparison should be gt

zacharycarter opened this issue · comments

if (arg_len > (int)sizeof(item.value) - 1) {

I believe the check here is backwards - it is currently checking if the length of the argument passed to the option is greater than the size of value array of the union (8 bytes). If it is, it currently copies 8 bytes from the argument into the buffer. I believe it should really allocate in this case - unless I'm misunderstanding the intent of this section of code.