mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
ovsdb-data: Make string parsing of negative 0 match JSON parsing.
This commit is contained in:
@@ -396,6 +396,11 @@ ovsdb_atom_from_string(union ovsdb_atom *atom, enum ovsdb_atomic_type type,
|
||||
if (!str_to_double(s, &atom->real)) {
|
||||
return xasprintf("\"%s\" is not a valid real number", s);
|
||||
}
|
||||
/* Our JSON input routines map negative zero to zero, so do that here
|
||||
* too for consistency. */
|
||||
if (atom->real == 0.0) {
|
||||
atom->real = 0.0;
|
||||
}
|
||||
break;
|
||||
|
||||
case OVSDB_TYPE_BOOLEAN:
|
||||
|
Reference in New Issue
Block a user