summaryrefslogtreecommitdiffstats
path: root/source/param/params.c
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
commite2ce5ce0fdaca0e38d953baa2da4c3542b0503ee (patch)
tree54fb43d51a30cc72a2d22e151f884199cfa01a94 /source/param/params.c
parentc8d88713d9f7a646eb3b8e76bdd0250a3b89b722 (diff)
downloadsamba-e2ce5ce0fdaca0e38d953baa2da4c3542b0503ee.tar.gz
samba-e2ce5ce0fdaca0e38d953baa2da4c3542b0503ee.tar.xz
samba-e2ce5ce0fdaca0e38d953baa2da4c3542b0503ee.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 -)-----
Diffstat (limited to 'source/param/params.c')
-rw-r--r--source/param/params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/param/params.c b/source/param/params.c
index 1cf3aa9eb12..9cb6412b960 100644
--- a/source/param/params.c
+++ b/source/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)