Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Bugfix: allow negative int values.
Browse files Browse the repository at this point in the history
ConfigParser::ReadInteger can handle these, but ::ReadValue was never
calling ::ReadInteger if the leading character was a - (minus) sign.
This makes the input to xsettingsd consistent with the output of
dump_xsettings.
  • Loading branch information
David committed Aug 14, 2014
1 parent 474f18a commit 9e3db86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ bool ConfigParser::ReadValue(Setting** setting_ptr) {
char ch = stream_->GetChar();
stream_->UngetChar(ch);

if (ch >= '0' && ch <= '9') {
if ((ch >= '0' && ch <= '9') || ch == '-') {
int32_t value = 0;
if (!ReadInteger(&value))
return false;
Expand Down

0 comments on commit 9e3db86

Please sign in to comment.