- fixed keyboard bug where - was thought to be numeric

This commit is contained in:
Mark Vejvoda
2012-01-09 15:52:15 +00:00
parent 15537e059a
commit 174e419314

View File

@@ -136,6 +136,9 @@ string doubleToStr(double d,int precsion) {
} }
bool IsNumeric(const char *p, bool allowNegative) { bool IsNumeric(const char *p, bool allowNegative) {
if(p != NULL && strcmp(p,"-") == 0) {
return false;
}
int index = 0; int index = 0;
for ( ; *p; p++) { for ( ; *p; p++) {
if (*p < '0' || *p > '9') { if (*p < '0' || *p > '9') {