Changeset 38558 for titan/titan/skin.h


Ignore:
Timestamp:
09/04/16 15:35:11 (7 years ago)
Author:
obi
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/skin.h

    r38555 r38558  
    361361{
    362362        int ret = -1;
    363         char *buf = NULL;
     363        char *buf = NULL, *tmpstr = NULL;
     364        tmpstr = ostrcat(value, NULL, 0, 0);
    364365
    365366        if(strcasecmp(value, "left") == 0)
     
    431432        else if(strcasecmp(value, "minitvsize") == 0)
    432433        {
     434                free(tmpstr), tmpstr = NULL;
    433435                if(getskinconfigint("minitv", NULL) == 1)
    434                         value = ostrcat("100%", NULL, 0, 0);
     436                        tmpstr = ostrcat("100%", NULL, 0, 0);
    435437                else
    436                         value = getskinconfig(value, NULL);
     438                        tmpstr = getskinconfig(value, NULL);
     439printf("11111111=%s tmpstr=%s ret=%d\n", value, tmpstr, ret);
     440
    437441        }
    438442
    439443        if(proz != NULL && ret == -1)
    440444        {
    441                 buf = strchr(value, '%');
     445                buf = strchr(tmpstr, '%');
     446
    442447                if(buf != NULL)
    443448                {
    444449                        buf[0] = '\0';
    445                         ret = atoi(value);
     450                        ret = atoi(tmpstr);
    446451                        *proz = 1;
    447452                        buf[0] = '%';
    448453                }
    449454                else
    450                         ret = atoi(value);
    451         }
     455                        ret = atoi(tmpstr);
     456        }
     457//      free(tmpstr), tmpstr = NULL;
    452458
    453459        return ret;
Note: See TracChangeset for help on using the changeset viewer.