Skip to content

Commit

Permalink
ini: Fix parsing of variable with spaces before the =
Browse files Browse the repository at this point in the history
At least from what the source code suggests, a variable declaration in
the config file as this should be supported:
DFLAGS = -I/usr/include/d

But in reality, if you live spaces like that, the variable value will
get uppercased.

This commit fixes this problem to properly parse the extra spaces.
  • Loading branch information
leandro-lucarella-sociomantic committed Jan 9, 2014
1 parent b1aa0cb commit 338b553
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/inifile.c
Expand Up @@ -285,7 +285,10 @@ const char *inifile(const char *argv0x, const char *inifilex, const char *envsec
{ if (islower((utf8_t)*p))
*p &= ~0x20;
else if (isspace((utf8_t)*p))
{
memmove(p, p + 1, strlen(p));
p--;
}
else if (*p == '=')
{
p++;
Expand Down

0 comments on commit 338b553

Please sign in to comment.