ramapcsx2 / gbs-control

GNU General Public License v3.0
793 stars 111 forks source link

Skip overwriting slots.bin if we fail to read the existing contents #465

Open nyanpasu64 opened 1 year ago

nyanpasu64 commented 1 year ago

Hopefully should guard against slots.bin corruption when the GBS-C crashes.

I haven't actually seen reading slots.bin fail since adding this check. I'll merge it if it happens and prevents corruption.

Do we trust SPIFFS at all?

nyanpasu64 commented 1 year ago

will just merge it, it can't hurt

...or idk even, how spiffs_hydro_read works

is the problem that running wifi callbacks in a deep call stack (talking to hardware) overflows the stack, and SlotMetaArray slotsObject; gets overwritten when we run request->getParam(0)?