diff --git a/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs b/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs index 8ce181d7..70206193 100644 --- a/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs +++ b/Libraries/UniversalEditor.UserInterface/Editors/Binary/BinaryEditor.cs @@ -513,8 +513,14 @@ namespace UniversalEditor.Editors.Binary return sb.ToString(); }, delegate(string input) { - long b = Int64.Parse(input); - return BitConverter.GetBytes(b); + string[] pieces = input.Split(new char[] { ' ' }); + byte[] bytes = new byte[pieces.Length]; + for (int i = 0; i < pieces.Length; i++) + { + bytes[i] = Byte.Parse(pieces[i]); + } + + return bytes; }, 4), new CONVERSION_DATA(null, "Octal", delegate(byte[] input) { @@ -780,6 +786,11 @@ namespace UniversalEditor.Editors.Binary sb.AppendLine(String.Format("Value for {0} must be between {1} and {2}", converter.DataType.Name, minValue, maxValue)); } } + else + { + // byte array + + } MessageDialog.ShowDialog(sb.ToString(), "Error", MessageDialogButtons.OK, MessageDialogIcon.Error); }