|ARM Technical Support Knowledge Articles|
Applies to: C51 C Compiler
Information in this article applies to:
I think I have found a problem with the printf library routine. The following example code:
unsigned char t1,t2; char xdata *unit = "This is a test"; t2 = strlen(unit); t1 = 0; printf("test: %.*s(%.*s)\n",(int)t1,unit,(int)t2,unit);
Outputs the following:
test: This is a test(This is a test)
The output from the %.*s should be 0 (zero) bytes long.
You are correct. This is a problem in the library routines of the C compiler.
This problem has been corrected in the library of version 6.10 or later. You may download the latest updates from the Keil Website.
Request the files attached to this knowledgebase article.
Article last edited on: 2005-10-20 07:38:49
Did you find this article helpful? Yes No
How can we improve this article?