Changeset 23991


Ignore:
Timestamp:
09/29/13 04:06:11 (10 years ago)
Author:
nit
Message:

[titan] fix

Location:
titan/titan
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/global.h

    r23987 r23991  
    51195119{
    51205120        char *buf = NULL, *buf1 = NULL, *buf2 = NULL;
    5121         unsigned char buf3 = '\0';
    51225121
    51235122        buf = ostrstr(line, searchstr);
     
    51355134                        return NULL;
    51365135                }
    5137                 buf3 = buf2[0];
    5138                 buf2[0] = '\0';
    5139                 buf1 = ostrcat(buf, NULL, 0, 0);
    5140                 buf2[0] = buf3;
     5136                buf1 = strndup(buf, buf2 - buf);
    51415137                if(buf1 == NULL)
    51425138                {
    5143                         err("ostrcat failed");
     5139                        err("strndup failed");
    51445140                        return NULL;
    51455141                }
     
    51615157                        }
    51625158                }
    5163                 buf3 = buf2[0];
    5164                 buf2[0] = '\0';
    5165                 buf1 = ostrcat(buf, NULL, 0, 0);
    5166                 buf2[0] = buf3;
     5159                buf1 = strndup(buf, buf2 - buf);
    51675160                if(buf1 == NULL)
    51685161                {
    5169                         err("ostrcat failed");
     5162                        err("strndup failed");
    51705163                        return NULL;
    51715164                }
  • titan/titan/skin.h

    r23983 r23991  
    827827                        free(ret);
    828828
    829                         if(getpic(newnode->pic) == NULL)
     829                        if(getpic(newnode->pic) == NULL && newnode->pic != NULL)
    830830                        {
    831831                                length = strlen(newnode->pic);
Note: See TracChangeset for help on using the changeset viewer.