Skip to content

Commit

Permalink
fix(wrap): 🐛 Fixed a small saving bug where you update on something t…
Browse files Browse the repository at this point in the history
…hat didn't exist yet
  • Loading branch information
Tsunami014 (Max) authored and Tsunami014 (Max) committed Dec 28, 2024
1 parent b4a9436 commit 872d673
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion BlazeSudio/utils/wrap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,10 @@ def modify(x):
pygame.image.save(out, fname)

writeHei = str(modify(thisOut.get_height()))
new = fc[:thisidx] + writeHei + '\n' + fc[thisidx+len(writeHei):]
if replaceName in fc:
new = fc[:thisidx] + writeHei + '\n' + fc[thisidx+len(writeHei):]
else:
new = fc + f'\n{replaceName}\x00{writeHei}'

with open(dataFname, 'w') as f:
f.write(new.replace('\n\n', '\n').strip('\n'))

0 comments on commit 872d673

Please sign in to comment.