Skip to content

Commit d1bdd6b

Browse files
authored
Update packet.h
1 parent 4337226 commit d1bdd6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TextConferencingLab/LAB2/packet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void packetToString(const Packet *packet, char *dest) {
6565
void stringToPacket(const char *str, Packet *dest_packet) {
6666

6767
memset(dest_packet -> data, 0, MAX_DATA);
68-
68+
if (strlen(str) == 0) return;
6969
// Compile Regex to match ":"
7070
regex_t regex;
7171
if(regcomp(&regex, "[:]", REG_EXTENDED)) {

0 commit comments

Comments
 (0)