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.
Diff: picocoap/src/coap.c
- Revision:
- 26:3d46024a8c30
- Parent:
- 22:6a6810897eb9
diff -r cfbd25fc62c4 -r 3d46024a8c30 picocoap/src/coap.c
--- a/picocoap/src/coap.c Tue Jan 06 13:02:02 2015 -0600
+++ b/picocoap/src/coap.c Wed Jan 07 12:37:30 2015 -0600
@@ -132,8 +132,15 @@
if (option.num == num) {
i++;
+ } else if (option.num > num) {
+ option.num = 0;
+ option.len = 0;
+ option.val = NULL;
+ break;
+ } else if (option.num == 0) {
+ break;
}
- } while (i < occ);
+ } while (i <= occ);
return option;
}