tweak initterms_e

This commit is contained in:
rjkiv 2025-07-27 12:08:35 -07:00
parent 4c88e1ab5e
commit 4fdeffba3c

View File

@ -19,13 +19,14 @@ namespace msvcrt {
}
int WIN_FUNC _initterm_e(const _PIFV *ppfn, const _PIFV *end) {
do {
if (_PIFV pfn = *++ppfn) {
if (int err = pfn())
while (ppfn < end) {
_PIFV func = *ppfn++;
if (func) {
int err = func();
if (err != 0)
return err;
}
} while (ppfn < end);
}
return 0;
}
}