Update 'sk2a/compressor.c'
This commit is contained in:
parent
30da46a2ee
commit
3d00dc9176
@ -235,13 +235,13 @@ int mylz78decompress(char* buff,int size,char** outbuf){
|
||||
words[index][strlen(words[number])] = c;
|
||||
|
||||
// ak nam nebude stacit miesto v *outbuf, treba allocovat viac
|
||||
while((strlen(words[index]) + pos) > (size - 1)){
|
||||
/*while((strlen(words[index]) + pos) > (size - 1)){
|
||||
size *= 2;
|
||||
char *tempbuf = calloc(size,sizeof(char));
|
||||
memset(tempbuf,'\0',size);
|
||||
strcpy(tempbuf,*outbuf);
|
||||
*outbuf = tempbuf;
|
||||
}
|
||||
}*/
|
||||
|
||||
strcpy(*outbuf + pos,words[index]);
|
||||
pos += strlen(words[index]);
|
||||
|
Loading…
Reference in New Issue
Block a user