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.
Revision 1:039fb6d44f92, committed 2011-08-25
- Comitter:
- jksoft
- Date:
- Thu Aug 25 02:15:08 2011 +0000
- Parent:
- 0:0e4cbd5ddf25
- Commit message:
Changed in this revision
PacketBuffer.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 0e4cbd5ddf25 -r 039fb6d44f92 PacketBuffer.cpp --- a/PacketBuffer.cpp Wed Aug 17 10:51:55 2011 +0000 +++ b/PacketBuffer.cpp Thu Aug 25 02:15:08 2011 +0000 @@ -8,10 +8,10 @@ PacketBuffer::PacketBuffer(int num,int packet_size) { - max_num = num + 1; + max_num = num; max_size = packet_size; - p_buf = new PacketBufInf[num]; + p_buf = new PacketBufInf[num]; for(int i = 0 ; i < num ; i++) { @@ -25,10 +25,10 @@ PacketBuffer::~PacketBuffer() { - for(int i = 0 ; i < max_num-1 ; i++) + for(int i = 0 ; i < max_num ; i++) { delete [] p_buf[i].buf; - } + } delete [] p_buf; }