Skip to content

Commit

Permalink
zero initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
salix5 committed Apr 25, 2024
1 parent 95aed16 commit 0d8011e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

template<typename T>
inline T buffer_read(unsigned char*& p) {
T ret = 0;
T ret{};
std::memcpy(&ret, p, sizeof(T));
p += sizeof(T);
return ret;
Expand Down

0 comments on commit 0d8011e

Please sign in to comment.