Protofall / Crayon-Savefile

A savefile system designed to take up little space and support version control. Works on PC and Dreamcast
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

crayon_savefile_add_variable() returning zero meaning unclear #21

Closed Protofall closed 4 years ago

Protofall commented 4 years ago

It will return zero if

At the moment, any variable id from 0 to (MAX_UINT32_NUM) is valid, so I don't have a space value to define as "error-ous"

One potential solution is to change the variable id type to int32_t and only let it be positive. Then I can change this functions return type and check for minus 1 as the new error case.