Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!m2c!wpi.WPI.EDU!fenn From: fenn@wpi.WPI.EDU (Brian Fennell) Newsgroups: comp.lang.c Subject: Re: Does anyone know why this is crashing?? Message-ID: <1991Jun1.160241.13095@wpi.WPI.EDU> Date: 1 Jun 91 16:02:41 GMT References: <6240@mahendo.Jpl.Nasa.Gov> Organization: Worcester Polytechnic Institute Lines: 23 In article <6240@mahendo.Jpl.Nasa.Gov> robert@triton.JPL.NASA.GOV writes: >I have this bit of code that works perfectly on a SPARC and crashes >on a VMS (O/S- V5.3-A) system?! > >int >init_files(startup_file,...) > char *startup_file; >{ >char buf[256]; > >#define EOPEN "Unable to open %s file \"%s\"\n" >(void) print_msg(PERROR,"init_files()", > sprintf(buf,EOPEN,"startup",startup_file)); > > - ------ - Robert Angelino all sprintf's were not created equal (Thanks to the ANSI non-standard standard) try changing: sprintf(buf, ...... ) to (sprintf(buf,.....) , buf) Brian Fennell == fenn@wpi.wpi.edu