added input filter for json parser

This commit is contained in:
Redecouverte 2011-02-25 18:04:21 +01:00
parent 44db374e09
commit 40238a9d25
2 changed files with 9 additions and 1 deletions

View File

@ -18,7 +18,6 @@
*/
package com.sk89q.worldguard.bukkit;
import com.nijikokun.bukkit.iConomy.iConomy;
import java.util.logging.*;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;

View File

@ -75,6 +75,15 @@ private static String readFileAsString(File file) throws java.io.IOException {
}
}
}
for(int i = 0; i < buffer.length; i++)
{
if(buffer[i] < 0x20 || buffer[i] > 0x126)
{
buffer[i] = 0x20;
}
}
return new String(buffer);
}