Fix use-of-uninitialized-value in save_savePartial

This commit is contained in:
kichikuou
2023-03-18 10:41:12 +09:00
parent 654a489f49
commit 9c2f423399
+2 -4
View File
@@ -515,11 +515,9 @@ int save_loadPartial(int no, struct VarRef *vref, int cnt) {
/* データの一部セーブ */
int save_savePartial(int no, struct VarRef *vref, int cnt) {
if (no >= SAVE_MAXNUMBER) {
if (no >= SAVE_MAXNUMBER || !varPage[vref->page].saveflag)
return SAVE_SAVEERR;
}
if (!varPage[vref->page].saveflag)
goto errexit;
cnt = min(cnt, v_sliceSize(vref));
int *var = v_resolveRef(vref);