瀏覽代碼

Fehler im dateiversions system bei neuen ordnern behoben

Kolja Strohm 5 年之前
父節點
當前提交
2a6606288a
共有 1 個文件被更改,包括 7 次插入3 次删除
  1. 7 3
      PatchServer/PatchServer.cpp

+ 7 - 3
PatchServer/PatchServer.cpp

@@ -1131,9 +1131,13 @@ void PSAKlient::thread()
                         path[ len ] = 0;
                         unsigned char l;
                         klient->getNachricht( (char *)& l, 1 );
-                        char *time = new char[ l + 1 ];
-                        klient->getNachricht( time, l );
-                        time[ l ] = 0;
+                        char *time = 0;
+                        if( l > 0 )
+                        {
+                            time = new char[ l + 1 ];
+                            klient->getNachricht( time, l );
+                            time[ l ] = 0;
+                        }
                         int system, gruppe;
                         klient->getNachricht( (char *)& system, 4 );
                         klient->getNachricht( (char *)& gruppe, 4 );