- if(pos<0)
- return;
- pos+=6;
- fi = save_fopen(filename, "wb");
- fwrite(&tag->data[6], pos-6, 1, fi);
- fwrite(&tag->data[pos+4], end-(pos+4), 1, fi);
- fclose(fi);
+ if(pos<0) {
+ fi = save_fopen(filename, "wb");
+ fwrite(&tag->data[6], end-6, 1, fi);
+ fclose(fi);
+ } else {
+ pos+=6;
+ fi = save_fopen(filename, "wb");
+ fwrite(&tag->data[6], pos-6, 1, fi);
+ fwrite(&tag->data[pos+4], end-(pos+4), 1, fi);
+ fclose(fi);
+ }