mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Forgot to double the value
This commit is contained in:
@@ -164,13 +164,16 @@ namespace SabreTools
|
|||||||
// Loop over the dictionary and see if there are matches
|
// Loop over the dictionary and see if there are matches
|
||||||
foreach (KeyValuePair<string, int> entry in tempDict)
|
foreach (KeyValuePair<string, int> entry in tempDict)
|
||||||
{
|
{
|
||||||
|
logger.Log("Attempting pattern '" + entry.Key + "' on header '" + header + "'");
|
||||||
if (Regex.IsMatch(header, entry.Key))
|
if (Regex.IsMatch(header, entry.Key))
|
||||||
{
|
{
|
||||||
|
logger.Log("Pattern match!");
|
||||||
type = test;
|
type = test;
|
||||||
headerSize = entry.Value;
|
headerSize = entry.Value;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Console.Read();
|
||||||
|
|
||||||
// If we found something, break out
|
// If we found something, break out
|
||||||
if (type != HeaderType.None)
|
if (type != HeaderType.None)
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ namespace SabreTools.Helper
|
|||||||
foreach (XmlNode child in node.SelectNodes("data"))
|
foreach (XmlNode child in node.SelectNodes("data"))
|
||||||
{
|
{
|
||||||
// Add an offset to the match if one exists
|
// Add an offset to the match if one exists
|
||||||
string header = (child.Attributes["offset"] != null && child.Attributes["offset"].Value != "0" ? "^.{" + Convert.ToInt32(child.Attributes["offset"].Value, 16) + "}" : "^");
|
string header = (child.Attributes["offset"] != null && child.Attributes["offset"].Value != "0" ? "^.{" + (Convert.ToInt32(child.Attributes["offset"].Value, 16) * 2) + "}" : "^");
|
||||||
header += child.Attributes["value"].Value;
|
header += child.Attributes["value"].Value;
|
||||||
|
|
||||||
// Now add the header and value to the appropriate skipper dictionary
|
// Now add the header and value to the appropriate skipper dictionary
|
||||||
|
|||||||
@@ -7,11 +7,9 @@
|
|||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
|
|
||||||
<!-- fig header -->
|
<!-- fig header -->
|
||||||
<!--
|
|
||||||
<rule start_offset="200">
|
<rule start_offset="200">
|
||||||
<data offset="16" value="0000000000000000"/>
|
<data offset="16" value="0000000000000000"/>
|
||||||
</rule>
|
</rule>
|
||||||
-->
|
|
||||||
|
|
||||||
<!-- smc header -->
|
<!-- smc header -->
|
||||||
<rule start_offset="200">
|
<rule start_offset="200">
|
||||||
|
|||||||
Reference in New Issue
Block a user