zsh-workers
 help / color / mirror / code / Atom feed
* Bug-fix for zsh-3.0pre6
@ 1996-08-11 11:20 Heiko Schroeder
  0 siblings, 0 replies; only message in thread
From: Heiko Schroeder @ 1996-08-11 11:20 UTC (permalink / raw)
  To: zsh-workers


Hi!

There is a small bug in math.c, in the function getcvar. It doesn't
check if the first char in the string is Meta and thus produces wrong
output in this case.

BTW, does it make sence to return a negative value for 8bit characters?
I think not, so I added a cast to unsigned char so that only positive
values are returned.

Changing the return statement to

    return (unsigned char)(*t == Meta ? t[1] ^ 32 : *t);

should fix the bug. (math.c, line 427)

CU
   Heiko

-- 
+----------------------------------------+------------------------------------+
|Email:                                  | Snail-mail:  Heiko Schroeder       |
|                                        |              Lerchenweg 120        |
|  heiko@pool.informatik.rwth-aachen.de  |              52223 Stolberg        |
|                                        |              GERMANY               |
+----------------------------------------+------------------------------------+


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-08-11 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-08-11 11:20 Bug-fix for zsh-3.0pre6 Heiko Schroeder

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).