Skip to content

Commit a7ca976

Browse files
committed
Merge pull request arduino#4669 from sandeepmistry/software-serial-peek-cast
Add missing cast to SoftwareSerial::peek() when returning buffered value
2 parents 219e540 + 98699df commit a7ca976

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The latest version of this library can always be found at
4848
// Statics
4949
//
5050
SoftwareSerial *SoftwareSerial::active_object = 0;
51-
char SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF];
51+
uint8_t SoftwareSerial::_receive_buffer[_SS_MAX_RX_BUFF];
5252
volatile uint8_t SoftwareSerial::_receive_buffer_tail = 0;
5353
volatile uint8_t SoftwareSerial::_receive_buffer_head = 0;
5454

hardware/arduino/avr/libraries/SoftwareSerial/src/SoftwareSerial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class SoftwareSerial : public Stream
6666
uint16_t _inverse_logic:1;
6767

6868
// static data
69-
static char _receive_buffer[_SS_MAX_RX_BUFF];
69+
static uint8_t _receive_buffer[_SS_MAX_RX_BUFF];
7070
static volatile uint8_t _receive_buffer_tail;
7171
static volatile uint8_t _receive_buffer_head;
7272
static SoftwareSerial *active_object;

0 commit comments

Comments
 (0)