Permalink
Browse files

more asprin

  • Loading branch information...
1 parent 45dd8a6 commit 29151153d8a2e7bda8ca7ad3bda9b8da03c6cb5a @keenerd keenerd committed Mar 7, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 jshon.c
View
@@ -116,8 +116,8 @@ json_t* smart_loads(char* j_string)
{
json_t* json;
json_error_t error;
- char temp[strlen(j_string) + 3];
- snprintf(temp, strlen(j_string) + 3, "[%s]", j_string);
+ char *temp;
+ asprintf(&temp, "[%s]", j_string);
json = json_loads(temp, 0, &error);
if (!json)
{return json_string(j_string);}

0 comments on commit 2915115

Please sign in to comment.