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(){
|
chunkpack getWholeChunk(){
|
||||||
static chunkpack gwc_next, gwc_complete;
|
static chunkpack gwc_next, gwc_complete;
|
||||||
static bool clean = false;
|
static bool clean = false;
|
||||||
|
int counter = 0;
|
||||||
if (!clean){gwc_complete.data = 0; clean = true;}//prevent brain damage
|
if (!clean){gwc_complete.data = 0; clean = true;}//prevent brain damage
|
||||||
chunkpack * ret = 0;
|
chunkpack * ret = 0;
|
||||||
scrubChunk(gwc_complete);
|
scrubChunk(gwc_complete);
|
||||||
while (true){
|
while (counter < 10000){
|
||||||
gwc_next = getChunk();
|
gwc_next = getChunk();
|
||||||
ret = AddChunkPart(gwc_next);
|
ret = AddChunkPart(gwc_next);
|
||||||
scrubChunk(gwc_next);
|
scrubChunk(gwc_next);
|
||||||
|
@ -492,9 +493,9 @@ chunkpack getWholeChunk(){
|
||||||
free(ret);//cleanup returned chunk
|
free(ret);//cleanup returned chunk
|
||||||
return gwc_complete;
|
return gwc_complete;
|
||||||
}
|
}
|
||||||
if (feof(stdin)){
|
if (feof(stdin) != 0){break;}
|
||||||
gwc_complete.msg_type_id = 0;
|
counter++;
|
||||||
return gwc_complete;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
gwc_complete.msg_type_id = 0;
|
||||||
|
return gwc_complete;
|
||||||
}//getWholeChunk
|
}//getWholeChunk
|
||||||
|
|
Loading…
Add table
Reference in a new issue