浏览代码

code: fix crash caused by improperly initialised callbacks

Dominik Madarász 3 年之前
父节点
当前提交
bc88c7d663
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/enet.h

+ 1 - 1
include/enet.h

@@ -1236,7 +1236,7 @@ extern "C" {
 // !
 // =======================================================================//
 
-    static ENetCallbacks callbacks = { malloc, free, abort, enet_packet_create, enet_packet_destroy };
+    ENetCallbacks callbacks = { malloc, free, abort, enet_packet_create, enet_packet_destroy };
 
     int enet_initialize_with_callbacks(ENetVersion version, const ENetCallbacks *inits) {
         if (version < ENET_VERSION_CREATE(1, 3, 0)) {