Skip to content

Commit e32ee9e

Browse files
authored
Update img_to_array.py (raspberrypi#501)
when the last part of the image generate in .h file it does not involve ";" at the end ,and will make error when we start make the project
1 parent eca13ac commit e32ee9e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

i2c/ssd1306_i2c/img_to_array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
buffer.append(f'{out_byte:#04x}')
7474

7575
buffer = ", ".join(buffer)
76-
buffer_hex = f'static uint8_t {img_name}[] = {{{buffer}}}\n'
76+
buffer_hex = f'static uint8_t {img_name}[] = {{{buffer}}};\n'
7777

7878
with open(f'{img_name}.h', 'wt') as file:
7979
file.write(f'#define IMG_WIDTH {img_width}\n')

0 commit comments

Comments
 (0)