forked from len0rd/rockbox
Fixed another code generation bug with viewports and enabled negative numbers in tag parameters
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26465 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e25c903bfe
commit
ea864be708
3 changed files with 6 additions and 5 deletions
|
@ -97,9 +97,10 @@ QString ParseTreeNode::genCode() const
|
|||
{
|
||||
|
||||
case VIEWPORT:
|
||||
if(children[0]->element->type == TAG)
|
||||
buffer.append(TAGSYM);
|
||||
buffer.append(children[0]->genCode());
|
||||
if(!children[0]->isParam()
|
||||
&& children[0]->getElement()->type == TAG)
|
||||
if(children[0]->element->type == TAG)
|
||||
buffer.append('\n');
|
||||
for(int i = 1; i < children.count(); i++)
|
||||
buffer.append(children[i]->genCode());
|
||||
|
|
|
@ -481,7 +481,7 @@ int skin_parse_tag(struct skin_element* element, char** document)
|
|||
element->params[i].type_code = *tag_args;
|
||||
|
||||
/* Checking a nullable argument for null */
|
||||
if(*cursor == DEFAULTSYM)
|
||||
if(*cursor == DEFAULTSYM && !isdigit(cursor[1]))
|
||||
{
|
||||
if(islower(*tag_args))
|
||||
{
|
||||
|
@ -497,7 +497,7 @@ int skin_parse_tag(struct skin_element* element, char** document)
|
|||
else if(tolower(*tag_args) == 'i')
|
||||
{
|
||||
/* Scanning an int argument */
|
||||
if(!isdigit(*cursor))
|
||||
if(!isdigit(*cursor) && *cursor != '-')
|
||||
{
|
||||
skin_error(INT_EXPECTED);
|
||||
return 0;
|
||||
|
|
|
@ -107,7 +107,7 @@ int scan_int(char** document)
|
|||
int retval;
|
||||
int i;
|
||||
|
||||
while(isdigit(*cursor) || *cursor == COMMENTSYM)
|
||||
while(isdigit(*cursor) || *cursor == COMMENTSYM || *cursor == '-')
|
||||
{
|
||||
if(*cursor == COMMENTSYM)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue