Skip to content

Commit 6c93518

Browse files
authored
Merge pull request #44 from enricodetoma/master
int must be initialized to 0 because it is larger than a single byte read from the serial port
2 parents 4f7950f + be5a803 commit 6c93518

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/portduino/linux/LinuxSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ namespace arduino {
190190
}
191191

192192
int LinuxSerial::read(void) {
193-
int buf;
193+
int buf = 0;
194194
::read(serial_port, &buf, 1);
195195
return buf;
196196
}

0 commit comments

Comments
 (0)