diff --git a/extras/150kernel/reboot150/main.c b/extras/150kernel/reboot150/main.c index b0814598..af8a9582 100644 --- a/extras/150kernel/reboot150/main.c +++ b/extras/150kernel/reboot150/main.c @@ -39,9 +39,9 @@ int module_start(SceSize args, void *argp) { int dreg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.dreg", PSP_O_RDONLY, 0); int ireg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.ireg", PSP_O_RDONLY, 0); - if(dreg < 0 && ireg < 0) { - dreg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.dreg", PSP_O_WRONLY | PSP_O_CREAT, 0777); - ireg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.ireg", PSP_O_WRONLY | PSP_O_CREAT, 0777); + if(dreg < 0 || ireg < 0) { + dreg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.dreg", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777); + ireg = sceIoOpen("ms0:/TM/DCARK/150/registry/system.ireg", PSP_O_WRONLY | PSP_O_CREAT | PSP_O_TRUNC, 0777); int flash_dreg = sceIoOpen("flash1:/registry/system.dreg", PSP_O_RDONLY, 0); int flash_ireg = sceIoOpen("flash1:/registry/system.ireg", PSP_O_RDONLY, 0);