Skip to content

Commit 444ede0

Browse files
committed
Added const modifier to String.c_str()
1 parent 19e4d38 commit 444ede0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/arduino/cores/arduino/WString.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class String
147147
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
148148
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
149149
{getBytes((unsigned char *)buf, bufsize, index);}
150-
char* c_str() const { return buffer; }
150+
const char * c_str() const { return buffer; }
151151

152152
// search
153153
int indexOf( char ch ) const;

0 commit comments

Comments
 (0)