[bugfix] wrong size for read string

This commit is contained in:
Yuichi Nishiwaki 2014-06-28 19:47:45 +09:00
parent cee98a9954
commit aae4bba98d
1 changed files with 1 additions and 1 deletions

View File

@ -299,7 +299,7 @@ read_string(pic_state *pic, struct pic_port *port, char c)
}
buf[cnt] = '\0';
str = pic_str_new(pic, buf, size);
str = pic_str_new(pic, buf, cnt);
pic_free(pic, buf);
return pic_obj_value(str);
}