Skip to content
Snippets Groups Projects
Commit defbfbb4 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix

Rev: src/modules/sprintf/sprintf.c:1.16
Rev: src/modules/sprintf/testsuite.in:1.9
parent 641d5c62
Branches
Tags
No related merge requests found
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
*/ */
#include "global.h" #include "global.h"
RCSID("$Id: sprintf.c,v 1.15 1998/02/20 01:09:36 hubbe Exp $"); RCSID("$Id: sprintf.c,v 1.16 1998/04/09 23:11:53 hubbe Exp $");
#include "error.h" #include "error.h"
#include "array.h" #include "array.h"
#include "svalue.h" #include "svalue.h"
...@@ -642,7 +642,7 @@ static string low_pike_sprintf(char *format, ...@@ -642,7 +642,7 @@ static string low_pike_sprintf(char *format,
s=sp; s=sp;
if(q) if(q)
{ {
push_array(q->array); ref_push_array(q->array);
}else{ }else{
array_index_no_free(sp,w,tmp); array_index_no_free(sp,w,tmp);
sp++; sp++;
......
...@@ -56,6 +56,12 @@ test_eq(sprintf("test \0"),"test \0") ...@@ -56,6 +56,12 @@ test_eq(sprintf("test \0"),"test \0")
test_eq(sprintf("%~*n","f",5),"fffff") test_eq(sprintf("%~*n","f",5),"fffff")
test_eq(sprintf("%'\000'*n",5),"\000\000\000\000\000") test_eq(sprintf("%'\000'*n",5),"\000\000\000\000\000")
test_true([[sprintf("%{%{%s%}\n%}",({({"hej"}),({"hop"})}))]])
test_true([[sprintf("%{%{%s%}\n%}",({({"hej"}),({"hop"})}))]])
test_true([[sprintf("%{%{%s%}\n%}",({({"hej"}),({"hop"})}))]])
test_true([[sprintf("%{%{%s%}\n%}",({({"hej"}),({"hop"})}))]])
test_true([[sprintf("%{%{%s%}\n%}",({({"hej"}),({"hop"})}))]])
dnl . : and ; hasn't been tested dnl . : and ; hasn't been tested
dnl ^, @ and _ hasn't been tested yet dnl ^, @ and _ hasn't been tested yet
test_eval_error(sprintf("%d")) test_eval_error(sprintf("%d"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment