Skip to content
Snippets Groups Projects
Commit 05376541 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

modstruct: struct_calcsize: Fix case of uninitialized var.

parent 44a949d5
No related branches found
No related tags found
No related merge requests found
...@@ -85,7 +85,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) { ...@@ -85,7 +85,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) {
char fmt_type = get_fmt_type(&fmt); char fmt_type = get_fmt_type(&fmt);
machine_uint_t size; machine_uint_t size;
for (size = 0; *fmt; fmt++) { for (size = 0; *fmt; fmt++) {
uint align; uint align = 1;
machine_uint_t cnt = 1; machine_uint_t cnt = 1;
if (unichar_isdigit(*fmt)) { if (unichar_isdigit(*fmt)) {
cnt = get_fmt_num(&fmt); cnt = get_fmt_num(&fmt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment