Skip to content

Commit

Permalink
fix printf vararg usage
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Jun 6, 2012
1 parent 62d6363 commit 97f7bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/runnable/extra-files/test2.d
Expand Up @@ -167,14 +167,14 @@ void test7()
printf("test7.1()\n");
ob.data[] = '-';
printf("test7.2()\n");
printf("ob.data[] = '%.*s'\n", ob.data);
printf("ob.data[] = '%.*s'\n", cast(int)ob.data.length, ob.data.ptr);
for (i = 0; i < 10; i++)
assert(ob.data[i] == '-');

ob.offset = 3;
ob.write("foo", 3);
printf("ob.data.length = %d\n", ob.data.length);
printf("ob.data[] = '%.*s'\n", ob.data);
printf("ob.data[] = '%.*s'\n", cast(int)ob.data.length, ob.data.ptr);
for (i = 0; i < 10; i++)
{ if (i < 3 || i >= 6)
assert(ob.data[i] == '-');
Expand Down

0 comments on commit 97f7bf1

Please sign in to comment.