NOG NOG meer fix
This commit is contained in:
parent
52e80d8f48
commit
f3bf83ddab
1 changed files with 6 additions and 5 deletions
|
@ -480,10 +480,11 @@ chunkpack * AddChunkPart(chunkpack newchunk){
|
|||
chunkpack getWholeChunk(){
|
||||
static chunkpack gwc_next, gwc_complete;
|
||||
static bool clean = false;
|
||||
int counter = 0;
|
||||
if (!clean){gwc_complete.data = 0; clean = true;}//prevent brain damage
|
||||
chunkpack * ret = 0;
|
||||
scrubChunk(gwc_complete);
|
||||
while (true){
|
||||
while (counter < 10000){
|
||||
gwc_next = getChunk();
|
||||
ret = AddChunkPart(gwc_next);
|
||||
scrubChunk(gwc_next);
|
||||
|
@ -492,9 +493,9 @@ chunkpack getWholeChunk(){
|
|||
free(ret);//cleanup returned chunk
|
||||
return gwc_complete;
|
||||
}
|
||||
if (feof(stdin)){
|
||||
gwc_complete.msg_type_id = 0;
|
||||
return gwc_complete;
|
||||
}
|
||||
if (feof(stdin) != 0){break;}
|
||||
counter++;
|
||||
}
|
||||
gwc_complete.msg_type_id = 0;
|
||||
return gwc_complete;
|
||||
}//getWholeChunk
|
||||
|
|
Loading…
Add table
Reference in a new issue