Fix hotkeys not being removed.

This commit is contained in:
UnknownShadow200 2015-11-18 13:32:19 +11:00
parent 4c0ccff680
commit caaafaf754
3 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,9 @@ namespace ClassicalSharp {
for( int i = 0; i < count; i++ ) {
char c = value[i];
int cpIndex = 0;
if( c >= ' ' && c <= '~' ) {
if( c == '&' ) {
buffer[index + i] = (byte)'%'; // escape colour codes
} else if( c >= ' ' && c <= '~' ) {
buffer[index + i] = (byte)c;
} else if( (cpIndex = Utils.ControlCharReplacements.IndexOf( c ) ) >= 0 ) {
buffer[index + i] = (byte)cpIndex;

View File

@ -78,6 +78,7 @@ namespace ClassicalSharp {
}
public static void Set( string key, string value ) {
key = key.ToLower();
if( value != null ) {
OptionsSet[key] = value;
} else {
@ -87,6 +88,7 @@ namespace ClassicalSharp {
}
public static void Set<T>( string key, T value ) {
key = key.ToLower();
OptionsSet[key] = value.ToString();
HasChanged = true;
}

View File

@ -18,7 +18,6 @@ namespace Launcher2 {
public static bool Start( string args ) {
Process process = null;
Options.Load();
string path = Path.Combine( AppDomain.CurrentDomain.BaseDirectory, "ClassicalSharp.exe" );
if( !File.Exists( path ) )
return false;