Skip to content

Commit 24292a6

Browse files
committed
Minor fixes...
1 parent 35a022c commit 24292a6

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

External/Plugins/FlashDebugger/Controls/StackframeUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class StackframeUI : DockPanelControl
3939
private List<ListViewItem> wholeFrameStack;
4040
private int lastSelected;
4141

42-
private List<string> userPaths;
42+
//private List<string> userPaths;
4343
private bool justMyCode;
4444

4545
public StackframeUI(PluginMain pluginMain, ImageList imageList)

PluginCore/ScintillaNet/ScintillaControl.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,18 +3210,12 @@ public void ClearRegisteredImages()
32103210
/// </summary>
32113211
unsafe public string GetLine(int line)
32123212
{
3213-
try
3214-
{
3215-
int sz = (int)SPerform(2153, (uint)line, 0);
3216-
byte[] buffer = new byte[sz + 1];
3217-
fixed (byte* b = buffer) SPerform(2153, (uint)line, (uint)b);
3218-
if (buffer[sz - 1] == 10) sz--;
3219-
return Encoding.GetEncoding(this.CodePage).GetString(buffer, 0, sz);
3220-
}
3221-
catch
3222-
{
3223-
return "";
3224-
}
3213+
int sz = (int)SPerform(2153, (uint)line, 0);
3214+
byte[] buffer = new byte[sz + 1];
3215+
fixed (byte* b = buffer) SPerform(2153, (uint)line, (uint)b);
3216+
if (sz == 0) return ""; // Empty last line
3217+
if (buffer[sz - 1] == 10) sz--;
3218+
return Encoding.GetEncoding(this.CodePage).GetString(buffer, 0, sz);
32253219
}
32263220

32273221
/// <summary>

0 commit comments

Comments
 (0)