Fix |options| argument usage in GetJSONWriterOptions (fixes issue #2647)

This commit is contained in:
Chris Dziemborowicz 2019-05-08 15:10:19 +00:00 committed by Marshall Greenblatt
parent ef06407da6
commit ad4ce5f441

View File

@ -20,11 +20,11 @@ int GetJSONReaderOptions(cef_json_parser_options_t options) {
int GetJSONWriterOptions(cef_json_writer_options_t options) {
int op = 0;
if (op & JSON_WRITER_OMIT_BINARY_VALUES)
if (options & JSON_WRITER_OMIT_BINARY_VALUES)
op |= base::JSONWriter::OPTIONS_OMIT_BINARY_VALUES;
if (op & JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION)
if (options & JSON_WRITER_OMIT_DOUBLE_TYPE_PRESERVATION)
op |= base::JSONWriter::OPTIONS_OMIT_DOUBLE_TYPE_PRESERVATION;
if (op & JSON_WRITER_PRETTY_PRINT)
if (options & JSON_WRITER_PRETTY_PRINT)
op |= base::JSONWriter::OPTIONS_PRETTY_PRINT;
return op;
}