projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ADDL、SUBL命令の内部構造を変更
[YACASL2.git]
/
src
/
word.c
diff --git
a/src/word.c
b/src/word.c
index
d2deaee
..
83ae9bd
100644
(file)
--- a/
src/word.c
+++ b/
src/word.c
@@
-40,12
+40,16
@@
WORD h2word(const char *str)
}
/* 10進数または16進数の文字列をWORD値に変換 */
}
/* 10進数または16進数の文字列をWORD値に変換 */
-WORD
a
2word(const char *str)
+WORD
nh
2word(const char *str)
{
{
- WORD word = 0x0;
+ WORD word;
+ if(!isdigit(*str) && *str != '-' && *str != '#') {
+ setcerr(114, str); /* not integer */
+ return 0x0;
+ }
if(*str == '#') {
word = h2word(str);
if(*str == '#') {
word = h2word(str);
- } else
if(isdigit(*str) || *str == '-')
{
+ } else {
word = n2word(str);
}
return word;
word = n2word(str);
}
return word;