home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk1.iso
/
altsrc
/
articles
/
11177
< prev
next >
Wrap
Text File
|
1994-08-26
|
1KB
|
30 lines
Path: wupost!psuvax1!rutgers!att-out!pacbell.com!decwrl!pa.dec.com!jrd.dec.com!diamond
From: diamond@jrd.dec.com (Norman Diamond)
Newsgroups: comp.editors,alt.sources,comp.misc,comp.unix.misc,comp.mail.misc,comp.unix.admin
Subject: Re: JOE 1.0.12 - Blurb
Date: 26 Aug 1994 10:25:05 GMT
Organization: Digital Equipment Corporation Japan , Tokyo
Lines: 15
Distribution: inet
Message-ID: <33kfu1$eff@usenet.pa.dec.com>
References: <Cur3x5.A95@world.std.com> <Cv0B4q.EDu@world.std.com> <Cv1o5M.2GC@world.std.com> <Cv4GDy.GMr@world.std.com>
Reply-To: diamond@jrd.dec.com (Norman Diamond)
NNTP-Posting-Host: jit533.jrd.dec.com
Xref: wupost comp.editors:12794 alt.sources:11177 comp.misc:21583 comp.unix.misc:16436 comp.mail.misc:17592 comp.unix.admin:26827
In article <Cv4GDy.GMr@world.std.com> jhallen@world.std.com (Joseph H Allen) writes:
>unsigned short a=1024;
>unsigned short b=1024;
>int c=311;
>char *d="Hello there";
>main() { printf("%x %x\n",d+c,d+a-(b-c)); }
>The fix for JOE is to change the two 'unsigned short's in the file b.h to
>'int's. This is truly a bizzare problem.
The correct fix is to change the two '%x' conversions to '%hx' conversions.
%x requires an unsigned int argument; %hx requires an unsigned short argument.
--
<< If this were the company's opinion, I would not be allowed to post it. >>
segmentation fault (california dumped)