Permalink
Browse files

Fixing issue where numbers that are part of a string could be treated…

… as pure numbers
  • Loading branch information...
1 parent 2600994 commit 5820c6f8d6194cddc79c135a2cc05b929e6ad9b2 @mariano committed Nov 5, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 query.cc
View
@@ -1454,7 +1454,7 @@ std::string node_db::Query::value(v8::Local<v8::Value> value, bool inArray, bool
}
} else if (value->IsBoolean()) {
currentStream << (value->IsTrue() ? '1' : '0');
- } else if (value->IsUint32() || value->IsInt32() || value->NumberValue() == value->IntegerValue()) {
+ } else if (value->IsUint32() || value->IsInt32() || (value->IsNumber() && value->NumberValue() == value->IntegerValue())) {
currentStream << value->IntegerValue();
} else if (value->IsNumber()) {
if (precision == -1) {

0 comments on commit 5820c6f

Please sign in to comment.