Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Made a fix for some kinds of TOC files? Not sure on the header yet
  • Loading branch information
druggedhippo authored Jul 12, 2022
1 parent 2f87c3a commit f0c76b3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion NVIDIAShaderBrowser/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,16 @@ string getProcessName(string file)
FileStream tocFs = File.OpenRead(file);
if (tocFs.ReadByte() == 0x44 && tocFs.ReadByte() == 0x58 && tocFs.ReadByte() == 0x44 && tocFs.ReadByte() == 0x43)
{
tocFs.Seek(0x08, SeekOrigin.Begin);
int seekPos = 80;
/** if the header has this byte, the name seems to start at a different place */
if (tocFs.ReadByte() == 0x55)
{
seekPos = 72;
}


tocFs.Seek(80, SeekOrigin.Begin);
tocFs.Seek(seekPos, SeekOrigin.Begin);
byte[] processNameB = new byte[255];
tocFs.Read(processNameB, 0, processNameB.Length);
processNameB = TrimTailingZeros(processNameB);
Expand Down

0 comments on commit f0c76b3

Please sign in to comment.