Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
[fw/altos] / src / stm32l0 / ao_flash_stm32l0.c
index ba3274422ef969797bb50b0e28e7eb3b6868fa15..521c5c0cfbb95d56317440c6c7be6bb55a0c5cde 100644 (file)
@@ -186,7 +186,7 @@ ao_storage_device_write(ao_pos_t pos, void *buf, uint16_t len)
                flash_write_select(this_pos);
 
                /* Update write buffer with new contents */
-               int this_word = 4 - (pos & 3);
+               uint16_t this_word = 4 - (pos & 3);
                if (this_word > len)
                        this_word = len;
                memcpy(&write_buf.u8[pos & 3], b8, this_word);