MSC 5.1 drops literals with Nulls

David J. Camp david at wubios.wustl.edu
Thu Mar 30 10:59:46 AEST 1989


I have discovered what I consider a bug introduced into Microsoft C 5.1.
This was not the behavior in MSC 5.0.  I have a string initialized like
this:

char name [257] = 
          "\x00\x01\x02 ... \x0f"
          "\x10\x11\x12 ... \x1f"
          ...
          "\xf0\xf1\xf2 ... \xff"
          ;

Now in MSC 5.0, the string was initialized as I expected.  name[0]
through name[255] took on the values 0 through 255.  When I recompiled
under MSC 5.1 though, the first sixteen values were dropped (I assume
because of the 0 byte) and the rest of the values were shifted over.
This name[0] was 16.  I think this must be a bug.
-David-

-- 
Bitnet:   david at wubios.wustl                ^      Mr. David J. Camp
Internet: david%wubios at wucs1.wustl.edu    < * >    Box 8067, Biostatistics
uucp:     uunet!wucs1!wubios!david          v      660 South Euclid
Washington University Medical School               Saint Louis, MO 63110



More information about the Comp.lang.c mailing list