OSDN Git Service
(root)
/
hengbandforosx
/
hengbandosx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1236ef4
)
自動拾いエディタで、空行について確保したメモリ領域外アクセスを行ってしまうバグを修正。
author
habu
<habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 8 Feb 2010 14:33:37 +0000
(14:33 +0000)
committer
habu
<habu@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 8 Feb 2010 14:33:37 +0000
(14:33 +0000)
src/autopick.c
patch
|
blob
|
history
diff --git
a/src/autopick.c
b/src/autopick.c
index
eacdc8e
..
aa3dd4d
100644
(file)
--- a/
src/autopick.c
+++ b/
src/autopick.c
@@
-210,7
+210,7
@@
static bool autopick_new_entry(autopick_type *entry, cptr str, bool allow_defaul
cptr prev_ptr, ptr, old_ptr;
int prev_flg;
- if (str[1] == ':') switch (str[0])
+ if (str[
0] && str[
1] == ':') switch (str[0])
{
case '?': case '%':
case 'A': case 'P': case 'C':
@@
-4792,7
+4792,7
@@
static void draw_text_editor(text_body_type *tb)
str1 = "This line is a comment.";
#endif
}
- else if (tb->lines_list[tb->cy][1] == ':')
+ else if (tb->lines_list[tb->cy][
0] && tb->lines_list[tb->cy][
1] == ':')
{
switch(tb->lines_list[tb->cy][0])
{