From 33946aae38470664fb9b60babd973394bec8ef3e Mon Sep 17 00:00:00 2001 From: StuffedAnon <stuffedgame@gmail.com> Date: Wed, 20 Mar 2019 13:00:59 +0900 Subject: [PATCH] Add sanity check for strange characters before >> And fix the mistakes that it catches --- sanityCheck | 2 ++ src/uncategorized/bodyModification.tw | 2 +- src/uncategorized/dairyReport.tw | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sanityCheck b/sanityCheck index e8e842b1976..98ca937510f 100755 --- a/sanityCheck +++ b/sanityCheck @@ -99,6 +99,8 @@ $GREP -e "<<option " --and --not -e "<<option *\(-\?[0-9]\+\|[\'\"].*[\'\"]\|fa # check for missing ; before statement $GREP 'if $ ' -- 'src/*' | myprint "missing ; before statement" $GREP 'elseif $ ' -- 'src/*' | myprint "missing ; before statement" +# Check for an unrecognized letter before >> +$GREP "[^]a-zA-Z0-9 \")}'+-\*\`] *>>" -- 'src/*' | myprint "StrangeCharacterAtEndOfCommand" # Check for a . inside a <<>> $GREP "<<[a-zA-Z]\([^\"'>]\|[^\"'>]>[^\"'>]\)*[a-zA-Z][.][^a-zA-Z]" | myprint "StrangeCharacterAfterDot" # Check for @@. instead of .@@ diff --git a/src/uncategorized/bodyModification.tw b/src/uncategorized/bodyModification.tw index 3ebc6ef2d38..9e77734b120 100644 --- a/src/uncategorized/bodyModification.tw +++ b/src/uncategorized/bodyModification.tw @@ -395,7 +395,7 @@ Choose piercing style: <<if $activeSlave.lipsPiercing != 1>><<set $activeSlave.lipsPiercing = 1>> <<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> <<if $activeSlave.tonguePiercing != 1>><<set $activeSlave.tonguePiercing = 1>> <<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> <<if $activeSlave.nipples != "fuckable">> - <<if $activeSlave.nipplesPiercing != 1 && >><<set $activeSlave.nipplesPiercing = 1>><<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> + <<if $activeSlave.nipplesPiercing != 1>><<set $activeSlave.nipplesPiercing = 1>><<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> <</if>> <<if $activeSlave.areolaePiercing != 1>><<set $activeSlave.areolaePiercing = 1>> <<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> <<if $activeSlave.corsetPiercing != 1>><<set $activeSlave.corsetPiercing = 1>> <<run cashX(forceNeg($modCost), "slaveMod", $activeSlave)>><</if>> diff --git a/src/uncategorized/dairyReport.tw b/src/uncategorized/dairyReport.tw index 551513703c5..c66e64ef586 100644 --- a/src/uncategorized/dairyReport.tw +++ b/src/uncategorized/dairyReport.tw @@ -458,7 +458,7 @@ <<run cashX(forceNeg($surgeryCost), "slaveSurgery", $slaves[$i])>> <</if>> <<if $slaves[$i].vasectomy == 1>> - <<set $slaves[$i].vasectomy = 0, $slaves[$i].health -= 10,>> + <<set $slaves[$i].vasectomy = 0, $slaves[$i].health -= 10>> <<run cashX(forceNeg($surgeryCost), "slaveSurgery", $slaves[$i])>> <</if>> <<if ($dairySlimMaintain == 0)>> -- GitLab