diff options
1 files changed, 1 insertions, 2 deletions
| -rw-r--r-- | src/Models/Table.cpp | 3 |
diff --git a/src/Models/Table.cpp b/src/Models/Table.cpp index 66edef4..afb77b1 100644 --- a/src/Models/Table.cpp +++ b/src/Models/Table.cpp @@ -30,10 +30,9 @@ void Table::putCell(unsigned row, unsigned col, const char* rawValue) { Cell* newCell; if (containsNumber(rawValue)) { - double intParse = atoi(rawValue); double doubleParse = atof(rawValue); - newCell = (abs(doubleParse) - abs(intParse) > 0.00001) + newCell = (abs(doubleParse) - (unsigned)(abs(doubleParse)) > 0.00001) ? (Cell*)new CellDouble(doubleParse) : (Cell*)new CellInt(intParse); } else { |
