Skip to content

Commit 997bb0a

Browse files
committed
Fix: Early-return an empty string_view when packet is empty.
1 parent 24090ca commit 997bb0a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

source/gameanalytics/Http/GAHttpWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ namespace gameanalytics
1515

1616
inline std::string_view toString() const
1717
{
18+
if(packet.empty()) return {};
1819
return std::string_view((const char*)packet.data(), packet.size());
1920
}
2021
};

0 commit comments

Comments
 (0)