This segfault doesn't strike me as particularly useful, also clean up and modernize some random stuff

This commit is contained in:
Alcaro
2020-01-26 20:07:45 +01:00
parent 56f58e57ca
commit 7d59bcec42
2 changed files with 5 additions and 7 deletions

View File

@@ -974,7 +974,7 @@ struct errorinfo CreatePatchToMem(LPCWSTR inromname, LPCWSTR outromname, enum pa
if (!romsmap[i])
{
if (i==1) delete romsmap[0];
return error(el_broken, "Couldn't read this ROM. What exactly are you doing?");
return error(el_broken, "Couldn't read this ROM.");
}
if (shouldRemoveHeader(romname, romsmap[i]->len()) && (patchtype==ty_bps || patchtype==ty_bps_linear || patchtype==ty_bps_moremem))
{
@@ -986,14 +986,14 @@ struct errorinfo CreatePatchToMem(LPCWSTR inromname, LPCWSTR outromname, enum pa
else
{
roms[i] = file::create(romname);
lens[i] = roms[i]->len();
if (!roms[i])
{
if (i==1) delete roms[0];
return error(el_broken, "Couldn't read this ROM. What exactly are you doing?");
return error(el_broken, "Couldn't read this ROM.");
}
if (shouldRemoveHeader(romname, roms[i]->len()) && (patchtype==ty_bps || patchtype==ty_bps_linear || patchtype==ty_bps_moremem))
lens[i] = roms[i]->len();
if (shouldRemoveHeader(romname, lens[i]) && (patchtype==ty_bps || patchtype==ty_bps_linear || patchtype==ty_bps_moremem))
{
roms[i] = new fileheader(roms[i]);
}

View File

@@ -15,7 +15,7 @@ STRIP="-s"
for i in "$@"; do
case "$i" in
--harden=yes)
FLAGS=$FLAGS' -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -pie -fPIE -D_FORTIFY_SOURCE=2'
FLAGS=$FLAGS' -fstack-protector-strong -pie -fPIE -D_FORTIFY_SOURCE=2'
true | gcc -E - -mmitigate-rop > /dev/null 2>&1 &&
FLAGS=$FLAGS' -mmitigate-rop'
;;
@@ -37,8 +37,6 @@ case "$i" in
esac
done
rm flips obj/*
if [ $PROFILE = yes ]; then
echo 'GTK+ (1/3)'