Files
for-gentoo/app-text/cuneiform/files/cuneiform-overflows.patch
T
Sławomir Nizio 5256c70bc3 [app-text/cuneiform] copy ebuild with a patch added to fix bug 2957
The patch is a hot-fix style.
2012-04-10 15:51:35 +02:00

37 lines
1.8 KiB
Diff

--- a/cuneiform_src/Kern/rstr/src/acc_tabs.c
+++ a/cuneiform_src/Kern/rstr/src/acc_tabs.c
@@ -1233,7 +1233,7 @@ if(is_cen_language(language))
strcpy(decode_ASCII_to_[(uchar)liga_i ], "_i_");
strcpy(decode_ASCII_to_[(uchar)liga_exm ], "_!_");
- strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!!_");
+ strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!_");
strcpy(decode_ASCII_to_[(uchar)right_quocket], "\xbb");
strcpy(decode_ASCII_to_[(uchar)liga_CC ], "\xa9");
strcpy(decode_ASCII_to_[(uchar)liga_CR ], "\xae");
@@ -2821,8 +2821,8 @@ if( CodePages[language]==CSTR_EASTEUROPE_CHARSET )
strcpy(decode_ASCII_to_[(uchar)liga_j ], "_j_");
strcpy(decode_ASCII_to_[(uchar)liga_exm ], "_!_");
strcpy(decode_ASCII_to_[(uchar)liga_qm ], "_?_");
- strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!!_");
- strcpy(decode_ASCII_to_[(uchar)liga_inv_qm ], "_??_");
+ strcpy(decode_ASCII_to_[(uchar)liga_inv_exm], "_!_");
+ strcpy(decode_ASCII_to_[(uchar)liga_inv_qm ], "_?_");
strcpy(decode_ASCII_to_[(uchar)liga_bull ], "\xB0");
strcpy(decode_ASCII_to_[(uchar)left_quocket], "«");
strcpy(decode_ASCII_to_[(uchar)right_quocket], "»");
--- a/cuneiform_src/Kern/rstr/src/match_wd.c
+++ a/cuneiform_src/Kern/rstr/src/match_wd.c
@@ -484,9 +484,10 @@ static Bool make_str_raster(cell *wb, cell *we, StrRaster *str_raster)
str_raster->w=(int32_t)(right-left);
str_raster->h=(int32_t)(bottom-top);
- if (str_raster->w > LINE_WIDTH || str_raster->h > LINE_HEIGHT)
+ if ((str_raster->w+7) > LINE_WIDTH || str_raster->h > LINE_HEIGHT)
return FALSE;
+ // gcc still reports an overflow, not sure what's wrong :(
memset(&str_raster->pict,0,(str_raster->w+7)/8*str_raster->h);
//cells to raster