Skip to content

Commit

Permalink
[LocalizedStringPlugin] Fixed bugs that were not fixed in #297 (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
shoushou1106 authored Aug 23, 2023
1 parent 5e99b55 commit ae033f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Plugins/LocalizedStringPlugin/FrostyLocalizedStringViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private void PART_ExportButton_Click(object sender, RoutedEventArgs e)
{
FrostyTaskWindow.Show("Exporting Localized Strings", "", (task) =>
{
using (NativeWriter writer = new NativeWriter(new FileStream(sfd.FileName, FileMode.Create), false, true))
using (StreamWriter writer = new StreamWriter(sfd.FileName))
{
int index = 0;
foreach (uint stringId in stringIds)
Expand Down Expand Up @@ -512,11 +512,11 @@ private void BtnImport_Click(object sender, RoutedEventArgs e)
int added = 0;
FrostyTaskWindow.Show("Importing Localized Strings", "", (task) =>
{
using (NativeReader reader = new NativeReader(new FileStream(ofd.FileName, FileMode.Open)))
using (StreamReader reader = new StreamReader(ofd.FileName))
{
while (reader.Position < reader.Length)
while (!reader.EndOfStream)
{
string line = reader.ReadWideLine();
string line = reader.ReadLine();
uint hash = uint.Parse(line.Substring(0, 8), System.Globalization.NumberStyles.HexNumber);
string s = line.Substring(10, line.Length - 11);
if (stringIds.Contains(hash) && s != db.GetString(hash))
Expand Down

0 comments on commit ae033f8

Please sign in to comment.