Fossil SCM
Update the pikchr.c file from the latest source from the Pikchr website.
Commit
d2b69d16c66218bf5935960199feeb660f5fb1c021a3bb0b8c497693e5379d32
Parent
c1cb6886cd15c3b…
1 file changed
+3
-2
+3
-2
| --- src/pikchr.c | ||
| +++ src/pikchr.c | ||
| @@ -5114,11 +5114,11 @@ | ||
| 5114 | 5114 | ** |
| 5115 | 5115 | ** Special color names "None" and "Off" return -1.0 without causing |
| 5116 | 5116 | ** an error. |
| 5117 | 5117 | */ |
| 5118 | 5118 | static PNum pik_lookup_color(Pik *p, PToken *pId){ |
| 5119 | - int first, last, mid, c; | |
| 5119 | + int first, last, mid, c = 0; | |
| 5120 | 5120 | first = 0; |
| 5121 | 5121 | last = count(aColor)-1; |
| 5122 | 5122 | while( first<=last ){ |
| 5123 | 5123 | const char *zClr; |
| 5124 | 5124 | int c1, c2, i; |
| @@ -5479,10 +5479,11 @@ | ||
| 5479 | 5479 | ** Search for object located at *pCenter that has an xChop method. |
| 5480 | 5480 | ** Return a pointer to the object, or NULL if not found. |
| 5481 | 5481 | */ |
| 5482 | 5482 | static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){ |
| 5483 | 5483 | int i; |
| 5484 | + if( pList==0 ) return 0; | |
| 5484 | 5485 | for(i=pList->n-1; i>=0; i--){ |
| 5485 | 5486 | PElem *pElem = pList->a[i]; |
| 5486 | 5487 | if( pElem->type->xChop!=0 |
| 5487 | 5488 | && pElem->ptAt.x==pCenter->x |
| 5488 | 5489 | && pElem->ptAt.y==pCenter->y |
| @@ -6330,6 +6331,6 @@ | ||
| 6330 | 6331 | printf("</body></html>\n"); |
| 6331 | 6332 | return 0; |
| 6332 | 6333 | } |
| 6333 | 6334 | #endif /* PIKCHR_SHELL */ |
| 6334 | 6335 | |
| 6335 | -#line 6360 "pikchr.c" | |
| 6336 | +#line 6361 "pikchr.c" | |
| 6336 | 6337 |
| --- src/pikchr.c | |
| +++ src/pikchr.c | |
| @@ -5114,11 +5114,11 @@ | |
| 5114 | ** |
| 5115 | ** Special color names "None" and "Off" return -1.0 without causing |
| 5116 | ** an error. |
| 5117 | */ |
| 5118 | static PNum pik_lookup_color(Pik *p, PToken *pId){ |
| 5119 | int first, last, mid, c; |
| 5120 | first = 0; |
| 5121 | last = count(aColor)-1; |
| 5122 | while( first<=last ){ |
| 5123 | const char *zClr; |
| 5124 | int c1, c2, i; |
| @@ -5479,10 +5479,11 @@ | |
| 5479 | ** Search for object located at *pCenter that has an xChop method. |
| 5480 | ** Return a pointer to the object, or NULL if not found. |
| 5481 | */ |
| 5482 | static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){ |
| 5483 | int i; |
| 5484 | for(i=pList->n-1; i>=0; i--){ |
| 5485 | PElem *pElem = pList->a[i]; |
| 5486 | if( pElem->type->xChop!=0 |
| 5487 | && pElem->ptAt.x==pCenter->x |
| 5488 | && pElem->ptAt.y==pCenter->y |
| @@ -6330,6 +6331,6 @@ | |
| 6330 | printf("</body></html>\n"); |
| 6331 | return 0; |
| 6332 | } |
| 6333 | #endif /* PIKCHR_SHELL */ |
| 6334 | |
| 6335 | #line 6360 "pikchr.c" |
| 6336 |
| --- src/pikchr.c | |
| +++ src/pikchr.c | |
| @@ -5114,11 +5114,11 @@ | |
| 5114 | ** |
| 5115 | ** Special color names "None" and "Off" return -1.0 without causing |
| 5116 | ** an error. |
| 5117 | */ |
| 5118 | static PNum pik_lookup_color(Pik *p, PToken *pId){ |
| 5119 | int first, last, mid, c = 0; |
| 5120 | first = 0; |
| 5121 | last = count(aColor)-1; |
| 5122 | while( first<=last ){ |
| 5123 | const char *zClr; |
| 5124 | int c1, c2, i; |
| @@ -5479,10 +5479,11 @@ | |
| 5479 | ** Search for object located at *pCenter that has an xChop method. |
| 5480 | ** Return a pointer to the object, or NULL if not found. |
| 5481 | */ |
| 5482 | static PElem *pik_find_chopper(PEList *pList, PPoint *pCenter){ |
| 5483 | int i; |
| 5484 | if( pList==0 ) return 0; |
| 5485 | for(i=pList->n-1; i>=0; i--){ |
| 5486 | PElem *pElem = pList->a[i]; |
| 5487 | if( pElem->type->xChop!=0 |
| 5488 | && pElem->ptAt.x==pCenter->x |
| 5489 | && pElem->ptAt.y==pCenter->y |
| @@ -6330,6 +6331,6 @@ | |
| 6331 | printf("</body></html>\n"); |
| 6332 | return 0; |
| 6333 | } |
| 6334 | #endif /* PIKCHR_SHELL */ |
| 6335 | |
| 6336 | #line 6361 "pikchr.c" |
| 6337 |