The problem was the size allocated for the output string. With numbers dead-reckoning works but when printing a string the is a need to check the size and to realloc. The code existed checking the size of the string, but not taking account of the additional segment of the format string -- hence the truncation after the %s. Anyway I think that is correct =John ff Quoting Rory Walsh : > Nice one John. I was just about to look at it again. Thanks. What was > causing the problem? > > On 30 March 2014 13:00, jpff wrote: >> Fixed in git >> ==John ff >> >> On Sat, 29 Mar 2014, Rory Walsh wrote: >> >>> I think Joachim mentioned something about this problem before, but you >>> can see from the instrument below that the prints opcode is sometimes >>> truncating strings. Removing the '.wav' part of the string seems to >>> resolve the issue. >>> >>> >>> instr 1 >>> iIndex, iDestinationTableLeft, iDestinationTableRight init 0 >>> gSfilepath strcpy >>> "/home/rory/sourcecode/cabbageaudio/CodeLiteCabbage/Standalone/temp.wav" >>> >>> Smsg sprintfk "\nSoundfiler %d is opening %s into function tables %d >>> and %d \n", iIndex, >>> "/home/rory/sourcecode/cabbageaudio/CodeLiteCabbage/Standalone/temp.wav", >>> iDestinationTableLeft, iDestinationTableRight >>> prints Smsg >>> >>> Smsg sprintfk "\nSoundfiler %d is opening %s into function tables %d >>> and %d \n", iIndex, gSfilepath, iDestinationTableLeft, >>> iDestinationTableRight >>> prints Smsg >>> endin >>> >>> ------------------------------------------------------------------------------ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net