Fossil SCM
Fix additional problems on the new TH1 implementation.
Commit
2c2b6c68b2da554651c3c8b88c725aab63659f8f41d3397ec8d090197865debb
Parent
17060ca29a05a52…
2 files changed
+2
-1
+1
-1
+2
-1
| --- src/th_main.c | ||
| +++ src/th_main.c | ||
| @@ -1157,11 +1157,11 @@ | ||
| 1157 | 1157 | return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES"); |
| 1158 | 1158 | } |
| 1159 | 1159 | if( enableOutput ){ |
| 1160 | 1160 | int height; |
| 1161 | 1161 | Blob name; |
| 1162 | - int nValue; | |
| 1162 | + int nValue = 0; | |
| 1163 | 1163 | const char *zValue; |
| 1164 | 1164 | char *z, *zH; |
| 1165 | 1165 | int nElem; |
| 1166 | 1166 | int *aszElem; |
| 1167 | 1167 | char **azElem; |
| @@ -1169,10 +1169,11 @@ | ||
| 1169 | 1169 | |
| 1170 | 1170 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 1171 | 1171 | Th_SplitList(interp, argv[2], TH1_LEN(argl[2]), &azElem, &aszElem, &nElem); |
| 1172 | 1172 | blob_init(&name, (char*)argv[1], TH1_LEN(argl[1])); |
| 1173 | 1173 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 1174 | + nValue = TH1_LEN(nValue); | |
| 1174 | 1175 | zH = htmlize(blob_buffer(&name), blob_size(&name)); |
| 1175 | 1176 | z = mprintf("<select id=\"%s\" name=\"%s\" size=\"%d\">", zH, zH, height); |
| 1176 | 1177 | free(zH); |
| 1177 | 1178 | sendText(0,z, -1, 0); |
| 1178 | 1179 | free(z); |
| 1179 | 1180 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1157,11 +1157,11 @@ | |
| 1157 | return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES"); |
| 1158 | } |
| 1159 | if( enableOutput ){ |
| 1160 | int height; |
| 1161 | Blob name; |
| 1162 | int nValue; |
| 1163 | const char *zValue; |
| 1164 | char *z, *zH; |
| 1165 | int nElem; |
| 1166 | int *aszElem; |
| 1167 | char **azElem; |
| @@ -1169,10 +1169,11 @@ | |
| 1169 | |
| 1170 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 1171 | Th_SplitList(interp, argv[2], TH1_LEN(argl[2]), &azElem, &aszElem, &nElem); |
| 1172 | blob_init(&name, (char*)argv[1], TH1_LEN(argl[1])); |
| 1173 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 1174 | zH = htmlize(blob_buffer(&name), blob_size(&name)); |
| 1175 | z = mprintf("<select id=\"%s\" name=\"%s\" size=\"%d\">", zH, zH, height); |
| 1176 | free(zH); |
| 1177 | sendText(0,z, -1, 0); |
| 1178 | free(z); |
| 1179 |
| --- src/th_main.c | |
| +++ src/th_main.c | |
| @@ -1157,11 +1157,11 @@ | |
| 1157 | return Th_WrongNumArgs(interp, "combobox NAME TEXT-LIST NUMLINES"); |
| 1158 | } |
| 1159 | if( enableOutput ){ |
| 1160 | int height; |
| 1161 | Blob name; |
| 1162 | int nValue = 0; |
| 1163 | const char *zValue; |
| 1164 | char *z, *zH; |
| 1165 | int nElem; |
| 1166 | int *aszElem; |
| 1167 | char **azElem; |
| @@ -1169,10 +1169,11 @@ | |
| 1169 | |
| 1170 | if( Th_ToInt(interp, argv[3], argl[3], &height) ) return TH_ERROR; |
| 1171 | Th_SplitList(interp, argv[2], TH1_LEN(argl[2]), &azElem, &aszElem, &nElem); |
| 1172 | blob_init(&name, (char*)argv[1], TH1_LEN(argl[1])); |
| 1173 | zValue = Th_Fetch(blob_str(&name), &nValue); |
| 1174 | nValue = TH1_LEN(nValue); |
| 1175 | zH = htmlize(blob_buffer(&name), blob_size(&name)); |
| 1176 | z = mprintf("<select id=\"%s\" name=\"%s\" size=\"%d\">", zH, zH, height); |
| 1177 | free(zH); |
| 1178 | sendText(0,z, -1, 0); |
| 1179 | free(z); |
| 1180 |
+1
-1
| --- src/tkt.c | ||
| +++ src/tkt.c | ||
| @@ -938,11 +938,11 @@ | ||
| 938 | 938 | const char *zValue; |
| 939 | 939 | int nValue; |
| 940 | 940 | if( aField[i].zAppend ) continue; |
| 941 | 941 | zValue = Th_Fetch(aField[i].zName, &nValue); |
| 942 | 942 | if( zValue ){ |
| 943 | - int nValue = TH1_LEN(nValue); | |
| 943 | + nValue = TH1_LEN(nValue); | |
| 944 | 944 | while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } |
| 945 | 945 | if( ((aField[i].mUsed & USEDBY_TICKETCHNG)!=0 && nValue>0) |
| 946 | 946 | || memcmp(zValue, aField[i].zValue, nValue)!=0 |
| 947 | 947 | ||(int)strlen(aField[i].zValue)!=nValue |
| 948 | 948 | ){ |
| 949 | 949 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -938,11 +938,11 @@ | |
| 938 | const char *zValue; |
| 939 | int nValue; |
| 940 | if( aField[i].zAppend ) continue; |
| 941 | zValue = Th_Fetch(aField[i].zName, &nValue); |
| 942 | if( zValue ){ |
| 943 | int nValue = TH1_LEN(nValue); |
| 944 | while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } |
| 945 | if( ((aField[i].mUsed & USEDBY_TICKETCHNG)!=0 && nValue>0) |
| 946 | || memcmp(zValue, aField[i].zValue, nValue)!=0 |
| 947 | ||(int)strlen(aField[i].zValue)!=nValue |
| 948 | ){ |
| 949 |
| --- src/tkt.c | |
| +++ src/tkt.c | |
| @@ -938,11 +938,11 @@ | |
| 938 | const char *zValue; |
| 939 | int nValue; |
| 940 | if( aField[i].zAppend ) continue; |
| 941 | zValue = Th_Fetch(aField[i].zName, &nValue); |
| 942 | if( zValue ){ |
| 943 | nValue = TH1_LEN(nValue); |
| 944 | while( nValue>0 && fossil_isspace(zValue[nValue-1]) ){ nValue--; } |
| 945 | if( ((aField[i].mUsed & USEDBY_TICKETCHNG)!=0 && nValue>0) |
| 946 | || memcmp(zValue, aField[i].zValue, nValue)!=0 |
| 947 | ||(int)strlen(aField[i].zValue)!=nValue |
| 948 | ){ |
| 949 |