Loading PacketLib.xcodeproj/project.pbxproj +2 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,7 @@ /* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ /* Begin PBXFileReference section */ DD3AB43119459AFB00498F60 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; }; DD6C793419255A5500406949 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; DD6C793419255A5500406949 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; DD6C793519255A5E00406949 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; }; DD6C793519255A5E00406949 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; }; DD6C793619255A6A00406949 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; DD6C793619255A6A00406949 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; Loading Loading @@ -225,6 +226,7 @@ DDB3B85F18CA2F5C00918955 = { DDB3B85F18CA2F5C00918955 = { isa = PBXGroup; isa = PBXGroup; children = ( children = ( DD3AB43119459AFB00498F60 /* Makefile */, DD6C793619255A6A00406949 /* README */, DD6C793619255A6A00406949 /* README */, DD6C793519255A5E00406949 /* Doxyfile */, DD6C793519255A5E00406949 /* Doxyfile */, DD6C793419255A5500406949 /* ChangeLog */, DD6C793419255A5500406949 /* ChangeLog */, Loading PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate +1.16 KiB (41.5 KiB) File changed.No diff preview for this file type. View original file View changed file include/ByteStream.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -100,7 +100,7 @@ public: /// Get the value in the stream starting from position start and of dim dimension /// Get the value in the stream starting from position start and of dim dimension /// \param start Start position in the stream of byte /// \param start Start position in the stream of byte /// \param dim number of byte (1 oe 2) /// \param dim number of byte (1 or 2) long getValue(dword start, word dim); long getValue(dword start, word dim); /// Gets the dimension of the stream /// Gets the dimension of the stream Loading src/ByteStream.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -226,8 +226,12 @@ long PacketLib::ByteStream::getValue(dword start, word dim) { { DEMORET0; DEMORET0; byte b1, b2; byte b1, b2; if(start >= byteInTheStream) throw new PacketException("PacketLib::ByteStream::getValue() start greater than the size of the ByteStream"); /// only 1 or 2 bytes /// only 1 or 2 bytes if(dim <=0 || dim > 2) if(dim == 0 || dim > 2) /// error /// error return -1; return -1; if(bigendian) if(bigendian) Loading Loading @@ -258,8 +262,10 @@ long PacketLib::ByteStream::getValue(dword start, word dim) } } else else { { b1 = (start-1)<0?0:stream[start-1]; //b1 = (start-1)<0?0:stream[start-1]; b2 = (start+2)>byteInTheStream?0:stream[start+2]; //b2 = (start+2)>byteInTheStream?0:stream[start+2]; b1=(start+1)>=byteInTheStream?0:stream[start+1]; b2=stream[start]; } } } } } } Loading src/PacketNotRecognized.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,7 @@ using namespace PacketLib; bool PacketNotRecognized::createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*) bool PacketNotRecognized::createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*) { { packetID = 0; if(header->loadHeader(fileName)) if(header->loadHeader(fileName)) { { name = new char [22]; name = new char [22]; Loading Loading
PacketLib.xcodeproj/project.pbxproj +2 −0 Original line number Original line Diff line number Diff line Loading @@ -112,6 +112,7 @@ /* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ /* Begin PBXFileReference section */ DD3AB43119459AFB00498F60 /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; }; DD6C793419255A5500406949 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; DD6C793419255A5500406949 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; }; DD6C793519255A5E00406949 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; }; DD6C793519255A5E00406949 /* Doxyfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Doxyfile; sourceTree = "<group>"; }; DD6C793619255A6A00406949 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; DD6C793619255A6A00406949 /* README */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README; sourceTree = "<group>"; }; Loading Loading @@ -225,6 +226,7 @@ DDB3B85F18CA2F5C00918955 = { DDB3B85F18CA2F5C00918955 = { isa = PBXGroup; isa = PBXGroup; children = ( children = ( DD3AB43119459AFB00498F60 /* Makefile */, DD6C793619255A6A00406949 /* README */, DD6C793619255A6A00406949 /* README */, DD6C793519255A5E00406949 /* Doxyfile */, DD6C793519255A5E00406949 /* Doxyfile */, DD6C793419255A5500406949 /* ChangeLog */, DD6C793419255A5500406949 /* ChangeLog */, Loading
PacketLib.xcodeproj/project.xcworkspace/xcuserdata/bulgarelli.xcuserdatad/UserInterfaceState.xcuserstate +1.16 KiB (41.5 KiB) File changed.No diff preview for this file type. View original file View changed file
include/ByteStream.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -100,7 +100,7 @@ public: /// Get the value in the stream starting from position start and of dim dimension /// Get the value in the stream starting from position start and of dim dimension /// \param start Start position in the stream of byte /// \param start Start position in the stream of byte /// \param dim number of byte (1 oe 2) /// \param dim number of byte (1 or 2) long getValue(dword start, word dim); long getValue(dword start, word dim); /// Gets the dimension of the stream /// Gets the dimension of the stream Loading
src/ByteStream.cpp +9 −3 Original line number Original line Diff line number Diff line Loading @@ -226,8 +226,12 @@ long PacketLib::ByteStream::getValue(dword start, word dim) { { DEMORET0; DEMORET0; byte b1, b2; byte b1, b2; if(start >= byteInTheStream) throw new PacketException("PacketLib::ByteStream::getValue() start greater than the size of the ByteStream"); /// only 1 or 2 bytes /// only 1 or 2 bytes if(dim <=0 || dim > 2) if(dim == 0 || dim > 2) /// error /// error return -1; return -1; if(bigendian) if(bigendian) Loading Loading @@ -258,8 +262,10 @@ long PacketLib::ByteStream::getValue(dword start, word dim) } } else else { { b1 = (start-1)<0?0:stream[start-1]; //b1 = (start-1)<0?0:stream[start-1]; b2 = (start+2)>byteInTheStream?0:stream[start+2]; //b2 = (start+2)>byteInTheStream?0:stream[start+2]; b1=(start+1)>=byteInTheStream?0:stream[start+1]; b2=stream[start]; } } } } } } Loading
src/PacketNotRecognized.cpp +1 −0 Original line number Original line Diff line number Diff line Loading @@ -23,6 +23,7 @@ using namespace PacketLib; bool PacketNotRecognized::createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*) bool PacketNotRecognized::createPacketType(char* fileName, bool prefix, word dimprefix) throw (PacketException*) { { packetID = 0; if(header->loadHeader(fileName)) if(header->loadHeader(fileName)) { { name = new char [22]; name = new char [22]; Loading