Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed by
Diff: rpc.h
- Revision:
- 6:3fd6a337c7cc
- Parent:
- 5:62573be585e9
- Child:
- 8:00a04e5cd407
--- a/rpc.h Thu Jan 22 18:32:40 2009 +0000
+++ b/rpc.h Fri Jan 23 14:15:56 2009 +0000
@@ -98,7 +98,7 @@
template<> inline char *parse_arg<char*>(const char *arg, const char **next) {
const char *ptr = arg;
- while(*ptr != 0 && *ptr != ' ' && *ptr != ',') {
+ while(*ptr >= '!' && *ptr != ',') {
ptr++;
}
int len = ptr-arg;
@@ -194,11 +194,19 @@
/* string */
template<> inline void write_result<char*>(char *val, char *result) {
- strcpy(result, val);
+ if(val==NULL) {
+ result[0] = 0;
+ } else {
+ strcpy(result, val);
+ }
}
template<> inline void write_result<const char*>(const char *val, char *result) {
- strcpy(result, val);
+ if(val==NULL) {
+ result[0] = 0;
+ } else {
+ strcpy(result, val);
+ }
}
