Commit 34f5d366 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro into develop

parents 9584032f 7ff76322
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
john@suckerfreegames.com john@suckerfreegames.com
*/ */
#define _IRR_STATIC_LIB_
#include <irrlicht.h> #include <irrlicht.h>
#include "CGUITTFont.h" #include "CGUITTFont.h"
......
...@@ -105,8 +105,7 @@ public: ...@@ -105,8 +105,7 @@ public:
template<typename ST> template<typename ST>
static void SendPacketToServer(unsigned char proto, const ST& st) { static void SendPacketToServer(unsigned char proto, const ST& st) {
auto p = duel_client_write; auto p = duel_client_write;
if (sizeof(ST) > MAX_DATA_SIZE) static_assert(sizeof(ST) <= MAX_DATA_SIZE, "Packet size is too large.");
return;
buffer_write<uint16_t>(p, (uint16_t)(1 + sizeof(ST))); buffer_write<uint16_t>(p, (uint16_t)(1 + sizeof(ST)));
buffer_write<uint8_t>(p, proto); buffer_write<uint8_t>(p, proto);
std::memcpy(p, &st, sizeof(ST)); std::memcpy(p, &st, sizeof(ST));
......
...@@ -43,8 +43,7 @@ public: ...@@ -43,8 +43,7 @@ public:
template<typename ST> template<typename ST>
static void SendPacketToPlayer(DuelPlayer* dp, unsigned char proto, const ST& st) { static void SendPacketToPlayer(DuelPlayer* dp, unsigned char proto, const ST& st) {
auto p = net_server_write; auto p = net_server_write;
if (sizeof(ST) > MAX_DATA_SIZE) static_assert(sizeof(ST) <= MAX_DATA_SIZE, "Packet size is too large.");
return;
buffer_write<uint16_t>(p, (uint16_t)(1 + sizeof(ST))); buffer_write<uint16_t>(p, (uint16_t)(1 + sizeof(ST)));
buffer_write<uint8_t>(p, proto); buffer_write<uint8_t>(p, proto);
std::memcpy(p, &st, sizeof(ST)); std::memcpy(p, &st, sizeof(ST));
......
...@@ -104,9 +104,8 @@ project "YGOPro" ...@@ -104,9 +104,8 @@ project "YGOPro"
end end
filter "system:linux" filter "system:linux"
linkoptions { "-static-libstdc++", "-static-libgcc" }
links { "GL", "X11", "Xxf86vm" } links { "GL", "X11", "Xxf86vm" }
linkoptions { "-fopenmp" } linkoptions { "-fopenmp", "-static-libstdc++", "-static-libgcc" }
if USE_AUDIO and AUDIO_LIB == "irrklang" then if USE_AUDIO and AUDIO_LIB == "irrklang" then
links { "IrrKlang" } links { "IrrKlang" }
linkoptions{ IRRKLANG_LINK_RPATH } linkoptions{ IRRKLANG_LINK_RPATH }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment