Skip to content

Commit df9f472

Browse files
committed
Fixed exception while filtering Pointer items
1 parent f0b7d9d commit df9f472

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

StructureSpiderAdvanced/MainWindow.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@
113113
Foreground="#FFC8C8C8" Visibility="{Binding Path=ViewModel.SelectedDataType, Converter={StaticResource ScanTypeToVisibilityConverter}, ConverterParameter=StringLength}"/>
114114

115115
<Button Name="SearchButton" Content="Search" HorizontalAlignment="Left" VerticalAlignment="Top" Width="80" Margin="5" Click="SearchButtonClick"/>
116+
117+
<Button Content="Filter Values" Margin="5" VerticalAlignment="Top" Click="FilterValues" ToolTip="Refresh values and delete all that not match scan value" IsEnabled="{Binding Path=ViewModel.InterfaceEnabled}"/>
118+
116119
<Button Name="UndoScanButton" Content="Undo Scan" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" Margin="5" Click="UndoScan" IsEnabled="{Binding Path=ViewModel.CanUndoScan}"/>
117120

118121
</StackPanel>
@@ -138,7 +141,6 @@
138141

139142
<StackPanel Grid.Row="6" Orientation="Horizontal">
140143
<Button Content="Refresh Values" Margin="5" Click="RefreshValues" ToolTip="Re-read all pointers using start address and offsets" IsEnabled="{Binding Path=ViewModel.InterfaceEnabled}"/>
141-
<Button Content="Filter Values" Margin="5" Click="FilterValues" ToolTip="Refresh values and delete all that not match scan value" IsEnabled="{Binding Path=ViewModel.InterfaceEnabled}"/>
142144
<Button Content="Delete Broken Pointers" Margin="5" ToolTip="Delete all incorrect/broken pointer" Click="DeleteBrokenPointers" IsEnabled="{Binding Path=ViewModel.InterfaceEnabled}"/>
143145

144146
<StackPanel Orientation="Vertical" Margin="20,0,0,0">

StructureSpiderAdvanced/ValueReaders/FloatValueReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public FloatValueReader(Memory m, MainViewModel mvm) : base(m, mvm)
1414

1515
public override void SetCompareValue(string value)
1616
{
17-
CompareValue = Convert.ToSingle(value);
17+
CompareValue = Convert.ToSingle(value.Replace(".", ","));
1818
CanUsePointerValue = M.PointerLength == 4;
1919
}
2020

@@ -58,7 +58,7 @@ public override IComparable ReadComparable(IntPtr address)
5858

5959
public override IComparable ConvertToComparableValue(string compareValue)
6060
{
61-
return Convert.ToSingle(compareValue);
61+
return Convert.ToSingle(compareValue.Replace(".", ","));
6262
}
6363
}
6464
}

StructureSpiderAdvanced/ValueReaders/PointerValueReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public override IComparable ReadComparable(IntPtr address)
5656

5757
public override IComparable ConvertToComparableValue(string compareValue)
5858
{
59-
return Convert.ToInt64(compareValue);
59+
return Convert.ToInt64(compareValue, 16);
6060
}
6161
}
6262
}

0 commit comments

Comments
 (0)