toolbox/emacsrunregion.m:
When extracting the text, don't overrun the array if the caller got it wrong.
This commit is contained in:
parent
b24f77d9d5
commit
caaa6599f5
1 changed files with 1 additions and 1 deletions
|
@ -19,6 +19,6 @@ function emacsrunregion(file, startchar, endchar)
|
|||
end
|
||||
|
||||
txt = fileread(file);
|
||||
evalTxt = txt(startchar:endchar);
|
||||
evalTxt = txt(startchar:min(endchar,length(txt)));
|
||||
evalin('base',evalTxt);
|
||||
end
|
Loading…
Reference in a new issue