[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg 1.6.5 notes



nick@debian.org (Nicolás Lichtmaier)  wrote on 24.12.99 in <[🔎] 19991224234316.H312@debian.org>:

>  Explanation of the patch: waddch expects a long int, and when the signed
> char is expanded to that type, if the char has the sign bit on the function
> don't work.

> -    while (i>0 && *p) { waddch(listpad, *p); p++; i--; }
> +    while (i>0 && *p) { waddch(listpad, (*p)<0?(*p)+256:*p ); p++; i--; }

Umm, the correct fix is surely

   while (i>0 && *p) { waddch(listpad, (unsigned char)*p); p++; i--; }

?!

Or even changing *p to be unsigned char * to begin with.

MfG Kai


Reply to: