Ticket #1952: tt1952.patch

File tt1952.patch, 0.8 KB (added by doughera, 3 years ago)
  • t/src/misc.t

    diff --git a/t/src/misc.t b/t/src/misc.t
    index bdbe183..05d16d4 100644
    a b  
    5454int main(int argc, const char **argv) 
    5555{ 
    5656    Parrot_Interp interp; 
     57    char buf[11]; 
    5758    interp = Parrot_new(NULL); 
    5859    if (! interp) 
    5960        fail("Cannot create parrot interpreter"); 
    60     char buf[11]; 
    6161    Parrot_snprintf(interp, buf, 11, "test%d", 123456); 
    6262    puts(buf); 
    6363 
     
    8888int main(int argc, const char **argv) 
    8989{ 
    9090    Parrot_Interp interp; 
     91    char *buf = "unchanged"; 
    9192    interp = Parrot_new(NULL); 
    9293    if (! interp) 
    9394        fail("Cannot create parrot interpreter"); 
    94     char *buf = "unchanged"; 
    9595    Parrot_snprintf(interp, buf, 0, ""); 
    9696 
    9797    if (buf == "unchanged") puts("Done");