misson20000 / twili

Homebrew debug monitor for the Nintendo Switch.
GNU General Public License v3.0
184 stars 23 forks source link

Don't crash system if nro has non-zero exit code #90

Open leo60228 opened 5 years ago

leo60228 commented 5 years ago

I'm not sure if this is possible, but it'd be nice for this code to not reboot the system when run with twib run -qa:


#include <stdlib.h>
#include <stdio.h>

int do_it() {
    return -1; // oops!
}

int main() {
    int error = do_it();
    if (error != 0) {
        eprintf("Couldn't do_it!\n");
        exit(1);
    }
    return 0;
}
misson20000 commented 4 years ago

Can you send me an NRO to try to reproduce this with?