mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
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)
This commit is contained in:
parent
282930d31f
commit
f0bd621a50
@ -114,7 +114,8 @@ typedef struct {
|
|||||||
static int mygetc(myFILE *f)
|
static int mygetc(myFILE *f)
|
||||||
{
|
{
|
||||||
if (f->p >= f->buf+f->size) return EOF;
|
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)
|
static void myfile_close(myFILE *f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user