diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-07-08 11:09:21 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-07-08 11:09:21 +0300 |
commit | eead4c7f6e29955a1a9578904a95c6291e8057b5 (patch) | |
tree | f9da47cdf242d962dd531a1447d315cdb6d6c906 | |
parent | 5f67f8e055a5044d44d4bdb6d86a8c96a89046a9 (diff) | |
download | egawk-eead4c7f6e29955a1a9578904a95c6291e8057b5.tar.gz egawk-eead4c7f6e29955a1a9578904a95c6291e8057b5.tar.bz2 egawk-eead4c7f6e29955a1a9578904a95c6291e8057b5.zip |
Fix printfchar test for -M.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | str_array.c | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2020-07-08 Arnold D. Robbins <arnold@skeeve.com> + + * str_array.c (str_lookup): If a pure number, copy to a string. Fixes + at least printfchar test for MPFR, possibly some others. + 2020-07-07 Arnold D. Robbins <arnold@skeeve.com> * awk.h: Turn all the flag defines into enums. GDB can then show diff --git a/str_array.c b/str_array.c index c90f7861..84bd2f02 100644 --- a/str_array.c +++ b/str_array.c @@ -168,9 +168,11 @@ str_lookup(NODE *symbol, NODE *subs) // Special cases: // 1. The string was generated using CONVFMT. // 2. The string was from an unassigned variable. - // 3. The string was from an unassigned field. + // 3. The string was from a straight number, perniciously, from MPFR + // 4. The string was from an unassigned field. if ( subs->stfmt != STFMT_UNUSED || subs == Nnull_string + || (subs->flags & STRING) == 0 || (subs->flags & NULL_FIELD) != 0) { NODE *tmp; |