Correctly remove the dependency files on clean and fix frame errors on architectures where chars default to unsigned,
fixes issue #52
This commit is contained in:
parent
f3343ad1cb
commit
17693ef549
|
|
@ -46,7 +46,7 @@ ${STATIC_LIB}: ${STATIC_OBJECTS}
|
|||
ar rcs ${STATIC_LIB} ${STATIC_OBJECTS}
|
||||
|
||||
clean:
|
||||
${RM} *.obj *~* ${SHARED_OBJECTS} ${STATIC_OBJECTS} ${SHARED_LIB} ${STATIC_LIB}
|
||||
${RM} *.obj *~* ${SHARED_OBJECTS} ${STATIC_OBJECTS} ${SHARED_LIB} ${STATIC_LIB} ${DEPENDENCIES}
|
||||
|
||||
${SHARED_OBJECTS}:
|
||||
${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
#include "framecheck.h"
|
||||
|
||||
#define TYPE_INVALID 0
|
||||
#define END_OF_FRAME -50
|
||||
#define END_OF_FRAME 206
|
||||
|
||||
/**
|
||||
* Set up namespace
|
||||
|
|
@ -102,7 +102,7 @@ ReceivedFrame::ReceivedFrame(const Buffer &buffer, uint32_t max) : _buffer(buffe
|
|||
if (!complete()) return;
|
||||
|
||||
// buffer is big enough, check for a valid end-of-frame marker
|
||||
if ((int)buffer.byte(_payloadSize+7) == END_OF_FRAME) return;
|
||||
if ((uint8_t)buffer.byte(_payloadSize+7) == END_OF_FRAME) return;
|
||||
|
||||
// the frame is invalid because it does not end with the expected char
|
||||
throw ProtocolException("invalid end of frame marker");
|
||||
|
|
|
|||
Loading…
Reference in New Issue