Browse Source

fixed bug with time overflow

Vladislav Gritsenko 7 years ago
parent
commit
b85927ee0d
3 changed files with 4 additions and 4 deletions
  1. 2 2
      include/enet.h
  2. 1 1
      package.json
  3. 1 1
      src/unix.c

+ 2 - 2
include/enet.h

@@ -443,7 +443,7 @@ extern void   enet_free (void *);
 
 #define ENET_VERSION_MAJOR 1
 #define ENET_VERSION_MINOR 4
-#define ENET_VERSION_PATCH 3
+#define ENET_VERSION_PATCH 6
 #define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch))
 #define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF)
 #define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF)
@@ -5512,7 +5512,7 @@ extern size_t enet_protocol_command_size (enet_uint8);
     enet_uint64
     enet_host_random_seed (void)
     {
-        return (enet_uint32) time (NULL);
+        return (enet_uint64) time (NULL);
     }
 
     enet_uint64

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "enet.c",
-  "version": "1.4.5",
+  "version": "1.4.6",
   "description": "ENet - Simple, lightweight and reliable UDP networking library written on pure C.",
   "main": "include/enet.h",
   "directories": {

+ 1 - 1
src/unix.c

@@ -78,7 +78,7 @@ enet_deinitialize (void)
 enet_uint64
 enet_host_random_seed (void)
 {
-    return (enet_uint32) time (NULL);
+    return (enet_uint64) time (NULL);
 }
 
 enet_uint64