Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!wucs1!wuphys!wugate!wubios!david From: david@wubios.wustl.edu (David J. Camp) Newsgroups: comp.lang.c Subject: MSC 5.1 drops literals with Nulls Keywords: MSC C 5.1 literals null bug Message-ID: <437@wubios.wustl.edu> Date: 30 Mar 89 00:59:46 GMT Organization: Washington University (St. Louis) Lines: 23 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@wubios.wustl ^ Mr. David J. Camp Internet: david%wubios@wucs1.wustl.edu < * > Box 8067, Biostatistics uucp: uunet!wucs1!wubios!david v 660 South Euclid Washington University Medical School Saint Louis, MO 63110