From e7a66f2ac96d3be043254352b99aac55b3bc4f9f Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 8 Aug 2007 12:11:24 +0000 Subject: [PATCH] fix bugs reported in PR 8848 svn: r7054 --- src/mzscheme/gc2/sighand.c | 2 +- src/mzscheme/src/string.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mzscheme/gc2/sighand.c b/src/mzscheme/gc2/sighand.c index 15cbc569ec..ce988e08d8 100644 --- a/src/mzscheme/gc2/sighand.c +++ b/src/mzscheme/gc2/sighand.c @@ -103,7 +103,7 @@ static void initialize_signal_handler() # ifdef NEED_SIGACTION { struct sigaction act, oact; - memset(&act, sizeof(sigaction), 0); + memset(&act, 0, sizeof(sigaction)); act.sa_sigaction = fault_handler; sigemptyset(&act.sa_mask); /* In MzScheme, SIGCHLD or SIGINT handling may trigger a write barrier: */ diff --git a/src/mzscheme/src/string.c b/src/mzscheme/src/string.c index d791a0e2da..e7a695f88a 100644 --- a/src/mzscheme/src/string.c +++ b/src/mzscheme/src/string.c @@ -4594,7 +4594,7 @@ static int utf8_decode_x(const unsigned char *s, int start, int end, /* Continues a sequence ... */ if (state) { /* ... and we're in one ... */ - if (!nextbits | (sc & nextbits)) { + if (!nextbits || (sc & nextbits)) { /* and we have required bits. */ v = (v << 6) + (sc & 0x3F); nextbits = 0;