[net.micro.amiga] sprintf problem

ken@ukma.UUCP (Ken Kubota) (01/04/86)

The sprintf function in the Lattice C library for the Amiga apparently
has problems dealing with strings of length larger than 200.  The
following fragment moves only the first 200 characters from buf1 to
buf2.

#include <stdio.h>
main(){
	char buf1[256], buf2[256];
	setmem(buf1,210,'A');
	buf1[210]='\0';
	printf("buf1 has %d characters\n",strlen(buf1));
	printf("wrote %d characters\n",
		sprintf(buf2,"%s",buf1));
	printf("length = %d\n", strlen(buf2));
}


cbosgd!ukma!ken
ken@ukma.bitnet