Browse Source

prc: fix compilation issue on MSVC

rdb 6 years ago
parent
commit
2e9bd0f241
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dtool/src/prc/encryptStream.cxx

+ 1 - 1
dtool/src/prc/encryptStream.cxx

@@ -22,7 +22,7 @@
  */
 bool IDecryptStream::
 read_magic(const char *magic, size_t size) {
-  char this_magic[size];
+  char *this_magic = (char *)alloca(size);
   read(this_magic, size);
 
   if (!fail() && gcount() == size && memcmp(this_magic, magic, size) == 0) {