X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=Awars%20III%2FStringText.m;fp=Awars%20III%2FStringText.m;h=9cc1af5dfe9628dba0d761c1d1640031916dc514;hb=3b72e3ebf077dc80e55f4659bff5085a0b8cda8d;hp=7f9364a6f6f0c66383d6464692e8f8315edb90e4;hpb=da900e15981d1bcec2435fe2d298f4de333c0487;p=awarsiii%2FAwarsIV.git diff --git a/Awars III/StringText.m b/Awars III/StringText.m index 7f9364a..9cc1af5 100644 --- a/Awars III/StringText.m +++ b/Awars III/StringText.m @@ -210,6 +210,7 @@ ST->wallFadeOut = false; */ int STIcnt = 0; + int STcnt = 0; for(int i = 1;i<=[fileDataArray count];i++){ NSString *str = [fileDataArray objectAtIndex:i-1]; NSRange range = NSMakeRange(2, str.length - 2); @@ -257,12 +258,15 @@ if (rangeSearch2.location != NSNotFound) {commentSwitch = true; }else if (rangeSearch.location != NSNotFound || rangeSearch10.location != NSNotFound) {commentSwitch = false; + STcnt++; + if(STItop) ST->i = STItop; + STItop = NULL; if(!ST){ ST = calloc(1, sizeof(STRING)); ST->next = calloc(1, sizeof(STRING)); STtop = ST; } - if(STItop) ST->i = STItop; + STIcnt = 0; if(ST) if(ST->S) @@ -352,7 +356,7 @@ STRING *TXCPYINDEX = TXCPY[fileNameIndex].S; - for(int L = 0;L < dialogMax-1;L++){ + for(int L = 1;L < STcnt;L++){ TXCPY[fileNameIndex].S = TXCPY[fileNameIndex].S->next; }