- variable was in the wrong scope.

This commit is contained in:
Christoph Oelckers 2016-10-02 18:56:04 +02:00
parent 37d61167ea
commit e84a7de390

View file

@ -321,8 +321,8 @@ protected:
} }
bool WriteDouble(double d) { bool WriteDouble(double d) {
if (internal::Double(d).IsNanOrInf()) { bool ret = true;
bool ret = true; if (internal::Double(d).IsNanOrInf()) {
if (!(writeFlags & kWriteNanAndInfFlag)) if (!(writeFlags & kWriteNanAndInfFlag))
{ {
// if we abort here, the writer is left in a broken state, unable to recover, so better write a 0 in addition to returning an error. // if we abort here, the writer is left in a broken state, unable to recover, so better write a 0 in addition to returning an error.