of *course* I had to introduce an inverse-logic error
d'oh. the XOR check's result needs to be reversed, as it tests for validity
This commit is contained in:
parent
a3cfe7d2cf
commit
c841d1513d
4
shf.c
4
shf.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.26 2009/04/07 19:08:25 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.27 2009/04/07 19:25:41 tg Exp $");
|
||||||
|
|
||||||
/* flags to shf_emptybuf() */
|
/* flags to shf_emptybuf() */
|
||||||
#define EB_READSW 0x01 /* about to switch to reading */
|
#define EB_READSW 0x01 /* about to switch to reading */
|
||||||
@ -175,7 +175,7 @@ struct shf *
|
|||||||
shf_sopen(char *buf, int bsize, int sflags, struct shf *shf)
|
shf_sopen(char *buf, int bsize, int sflags, struct shf *shf)
|
||||||
{
|
{
|
||||||
/* can't have a read+write string */
|
/* can't have a read+write string */
|
||||||
if (!(sflags & SHF_RD) ^ !(sflags & SHF_WR))
|
if (!(!(sflags & SHF_RD) ^ !(sflags & SHF_WR)))
|
||||||
internal_errorf("shf_sopen: flags 0x%x", sflags);
|
internal_errorf("shf_sopen: flags 0x%x", sflags);
|
||||||
|
|
||||||
if (!shf) {
|
if (!shf) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user