Fixed bug with null String values in Touhou Mother module.

r3cp3ct-Japanese-sticker-triggers
sigonasr2 7 years ago
parent dd3d9148f3
commit 6dd2145ef9
  1. BIN
      sigIRCv2.jar
  2. 2
      src/sig/modules/TouhouMotherModule.java
  3. 6
      src/sig/utils/TextUtils.java

Binary file not shown.

@ -164,7 +164,7 @@ public class TouhouMotherModule extends Module implements ActionListener{
public void actionPerformed(ActionEvent ev) { public void actionPerformed(ActionEvent ev) {
//memory = FileUtils.readFromFile(sigIRC.BASEDIR+"memory"); //memory = FileUtils.readFromFile(sigIRC.BASEDIR+"memory");
//System.out.println(Arrays.toString(memory)); //System.out.println(Arrays.toString(memory));
memory = new String[19]; memory = new String[]{"","","","","","","","","","","","","","","","","","",""};
if (foundTouhouMother) { if (foundTouhouMother) {
memory[0] = Integer.toString(ReadIntFromBuriedMemoryOffset(0xA2A84,0x6DC,0x2C0,0x8,0x6AC,0x2F0)); memory[0] = Integer.toString(ReadIntFromBuriedMemoryOffset(0xA2A84,0x6DC,0x2C0,0x8,0x6AC,0x2F0));

@ -33,7 +33,11 @@ public class TextUtils {
public static boolean isNumeric(String str) public static boolean isNumeric(String str)
{ {
return str.matches("-?\\d+(\\.\\d+)?"); //match a number with optional '-' and decimal. if (str.length()>0) {
return str.matches("-?\\d+(\\.\\d+)?"); //match a number with optional '-' and decimal.
} else {
return false;
}
} }
public static boolean isInteger(String s, int radix) { public static boolean isInteger(String s, int radix) {

Loading…
Cancel
Save