Skip to content

Commit 0537654

Browse files
committed
modstruct: struct_calcsize: Fix case of uninitialized var.
1 parent 44a949d commit 0537654

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/modstruct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ STATIC mp_obj_t struct_calcsize(mp_obj_t fmt_in) {
8585
char fmt_type = get_fmt_type(&fmt);
8686
machine_uint_t size;
8787
for (size = 0; *fmt; fmt++) {
88-
uint align;
88+
uint align = 1;
8989
machine_uint_t cnt = 1;
9090
if (unichar_isdigit(*fmt)) {
9191
cnt = get_fmt_num(&fmt);

0 commit comments

Comments
 (0)