009e7b845b
It seems that the union type Packet didn't initialize Packet::type to PacketType::NONE using in class initialization. I've fixed this by moving the initialization of Packet::type to Packet::Packet(). This might actually be a compiler error, I might need to let someone know.
11 lines
137 B
C++
11 lines
137 B
C++
#include "packet_type.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
Packet p;
|
|
cout << int(p.type) << endl;
|
|
return 0;
|
|
} |