diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2015-01-27 09:52:18 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2015-01-27 09:52:18 +0100 |
commit | 1ecfe811fe2f70380170ef7d820e8150054e88ca (patch) | |
tree | 2ecabb7c7b054ae8146942d08f361380473fb0db /shell | |
parent | 6968e081230fb6434a2a6f0eed39d538ea982f3f (diff) | |
download | busybox-w32-1_23_1.tar.gz busybox-w32-1_23_1.tar.bz2 busybox-w32-1_23_1.zip |
Apply post-1.23.0 patches, bump version to 1.23.11_23_1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c index 90fb00fbd..c5ad96909 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -6746,6 +6746,14 @@ varvalue(char *name, int varflags, int flags, struct strlist *var_str_list) | |||
6746 | len = strlen(p); | 6746 | len = strlen(p); |
6747 | if (!(subtype == VSPLUS || subtype == VSLENGTH)) | 6747 | if (!(subtype == VSPLUS || subtype == VSLENGTH)) |
6748 | memtodest(p, len, syntax, quotes); | 6748 | memtodest(p, len, syntax, quotes); |
6749 | #if ENABLE_UNICODE_SUPPORT | ||
6750 | if (subtype == VSLENGTH && len > 0) { | ||
6751 | reinit_unicode_for_ash(); | ||
6752 | if (unicode_status == UNICODE_ON) { | ||
6753 | len = unicode_strlen(p); | ||
6754 | } | ||
6755 | } | ||
6756 | #endif | ||
6749 | return len; | 6757 | return len; |
6750 | } | 6758 | } |
6751 | 6759 | ||
@@ -6829,15 +6837,7 @@ evalvar(char *p, int flags, struct strlist *var_str_list) | |||
6829 | varunset(p, var, 0, 0); | 6837 | varunset(p, var, 0, 0); |
6830 | 6838 | ||
6831 | if (subtype == VSLENGTH) { | 6839 | if (subtype == VSLENGTH) { |
6832 | ssize_t n = varlen; | 6840 | cvtnum(varlen > 0 ? varlen : 0); |
6833 | if (n > 0) { | ||
6834 | reinit_unicode_for_ash(); | ||
6835 | if (unicode_status == UNICODE_ON) { | ||
6836 | const char *val = lookupvar(var); | ||
6837 | n = unicode_strlen(val); | ||
6838 | } | ||
6839 | } | ||
6840 | cvtnum(n > 0 ? n : 0); | ||
6841 | goto record; | 6841 | goto record; |
6842 | } | 6842 | } |
6843 | 6843 | ||