Просмотр исходного кода

initialize the whole search array with zero

Git-Dch: Ignore
David Kalnischkies лет назад: 13
Родитель
Сommit
991e690a69
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cmdline/apt-cache.cc

+ 1 - 1
cmdline/apt-cache.cc

@@ -1247,7 +1247,7 @@ bool Search(CommandLine &CmdL)
    }
    
    ExDescFile *DFList = new ExDescFile[Cache->HeaderP->GroupCount+1];
-   memset(DFList,0,sizeof(*DFList)*Cache->HeaderP->GroupCount+1);
+   memset(DFList, 0, sizeof(*DFList) * (Cache->HeaderP->GroupCount + 1));
 
    // Map versions that we want to write out onto the VerList array.
    for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() == false; ++G)