mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Disable the experimental code, oops KKona
This commit is contained in:
parent
5fcec26a5c
commit
b68b0845c1
1 changed files with 6 additions and 0 deletions
|
@ -104,7 +104,9 @@ void runNativeMessagingHost()
|
||||||
|
|
||||||
auto &nmm = chatterino::singletons::NativeMessagingManager::getInstance();
|
auto &nmm = chatterino::singletons::NativeMessagingManager::getInstance();
|
||||||
|
|
||||||
|
#if 0
|
||||||
bool bigEndian = isBigEndian();
|
bool bigEndian = isBigEndian();
|
||||||
|
#endif
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
char size_c[4];
|
char size_c[4];
|
||||||
|
@ -114,6 +116,9 @@ void runNativeMessagingHost()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t size = *reinterpret_cast<uint32_t *>(size_c);
|
||||||
|
#if 0
|
||||||
|
// To avoid breaking strict-aliasing rules and potentially inducing undefined behaviour, the following code can be run instead
|
||||||
uint32_t size = 0;
|
uint32_t size = 0;
|
||||||
if (bigEndian) {
|
if (bigEndian) {
|
||||||
size = size_c[3] | static_cast<uint32_t>(size_c[2]) << 8 |
|
size = size_c[3] | static_cast<uint32_t>(size_c[2]) << 8 |
|
||||||
|
@ -122,6 +127,7 @@ void runNativeMessagingHost()
|
||||||
size = size_c[0] | static_cast<uint32_t>(size_c[1]) << 8 |
|
size = size_c[0] | static_cast<uint32_t>(size_c[1]) << 8 |
|
||||||
static_cast<uint32_t>(size_c[2]) << 16 | static_cast<uint32_t>(size_c[3]) << 24;
|
static_cast<uint32_t>(size_c[2]) << 16 | static_cast<uint32_t>(size_c[3]) << 24;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
char *b = (char *)malloc(size + 1);
|
char *b = (char *)malloc(size + 1);
|
||||||
std::cin.read(b, size);
|
std::cin.read(b, size);
|
||||||
|
|
Loading…
Reference in a new issue