summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>2000-10-18 01:36:26 +0000
committerChristopher R. Hertel <crh@samba.org>2000-10-18 01:36:26 +0000
commitf0bd621a504082e9b16ff1b5a56c8987e6f94e30 (patch)
tree56b558350b1032f6f20270744e6e5af79e20dbd8 /source3/param
parent282930d31f83e658573d1582d2ac89c98616ee2d (diff)
downloadsamba-f0bd621a504082e9b16ff1b5a56c8987e6f94e30.tar.gz
samba-f0bd621a504082e9b16ff1b5a56c8987e6f94e30.tar.bz2
samba-f0bd621a504082e9b16ff1b5a56c8987e6f94e30.zip
Bug report that on some systems extended characters are being returned as
negative values from the mygetc() function. I've modified the return line so that it should return values in the 0..255 range for legitimate characters. This change should probably be copied into SAMBA_2_2 but I haven't checked that tree out yet. Chris -)----- (This used to be commit e2ce5ce0fdaca0e38d953baa2da4c3542b0503ee)
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/param/params.c b/source3/param/params.c
index 1cf3aa9eb1..9cb6412b96 100644
--- a/source3/param/params.c
+++ b/source3/param/params.c
@@ -114,7 +114,8 @@ typedef struct {
static int mygetc(myFILE *f)
{
if (f->p >= f->buf+f->size) return EOF;
- return (int)*(f->p++);
+ /* be sure to return chars >127 as positive values */
+ return (int)( *(f->p++) & 0x00FF );
}
static void myfile_close(myFILE *f)