We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22f5e30 commit faf0789Copy full SHA for faf0789
1 file changed
src/fdc.c
@@ -260,6 +260,11 @@ static void pre_exec_write_data(void) {
260
static uint8_t exec_write_data(uint8_t value) {
261
rw_args_t *rw_args = (rw_args_t *)args;
262
263
+ if (rwcount_max == 0) {
264
+ LOG_WARN("Write execution happened when no data can be written");
265
+ return 0;
266
+ }
267
+
268
exec_buffer[rwcount++] = value;
269
270
if (rwcount == rwcount_max) {
@@ -337,6 +342,11 @@ static void pre_exec_read_data(void) {
337
342
static uint8_t exec_read_data(uint8_t value) {
338
343
339
344
345
346
+ LOG_WARN("Read execution happened when no data can be read");
347
348
349
340
350
// read doesn't care of in value
341
351
(void)value;
352
uint8_t ret = exec_buffer[rwcount++];
0 commit comments