Skip to content

Commit

Permalink
Bug Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ludibrium committed Jan 8, 2019
1 parent 1bae9a8 commit 753063c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Rich6Extractor/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ private void ToolStripMenuItem1_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
treeView1.Nodes.Clear();
var f = new OpenFileDialog();
f.Filter = ".pck文件|*.pck";
f.ShowDialog();
Expand Down
5 changes: 4 additions & 1 deletion Rich6Extractor/Rich6Viewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class Rich6Viewer
public int begin;
public int stride = 0x108;
int sizeLen;
int fileNum;

public Rich6Viewer(string path,int RichVersion)
{
Expand All @@ -28,10 +29,12 @@ public Rich6Viewer(string path,int RichVersion)
case 6:
sizeLen = 4;
begin = 9;
fileNum = 2143;
break;
case 7:
sizeLen = 4;
begin = 8;
fileNum = 3671;
break;
default:
throw new ArgumentException("No Support Rich Version.");
Expand All @@ -51,7 +54,7 @@ public Rich6Viewer(string path,int RichVersion)
public void ReadAll()
{
var encoding = Encoding.GetEncoding(936);
for (int temp_begin = begin; temp_begin < 0x8a200; temp_begin += stride)
for (int temp_begin = begin; temp_begin < 0x108*fileNum; temp_begin += stride)
{
int len = 0;
while (mv.ReadByte(temp_begin + len) != 0) len++;
Expand Down

0 comments on commit 753063c

Please sign in to comment.