Merge pull request #356 from bloqaudio/fix/config-post-race

httpd: buffer a configuration upload before touching the flash
This commit is contained in:
René van Dorst
2026-08-24 23:35:19 +00:00
committed by GitHub
4 changed files with 128 additions and 6 deletions
+26
View File
@@ -366,6 +366,32 @@ char strcmp(register __xdata const uint8_t *a, register __code const uint8_t *b)
}
/*
* True when b is a prefix of a. Unlike strcmp() the byte after the match is not
* compared, and unlike is_word_x() it need not be a separator.
*/
bool strstart(__xdata const uint8_t *a, __code const uint8_t *b)
{
uint8_t i = 0;
while (b[i] && (b[i] == a[i]))
i++;
return !b[i];
}
bool strstart_x(__xdata const uint8_t *a, __xdata const uint8_t *b)
{
uint8_t i = 0;
while (b[i] && (b[i] == a[i]))
i++;
return !b[i];
}
void print_short(uint16_t a)
{
// allocating the registers first improves the sdcc code here