代码拉取完成,页面将自动刷新
From 35f29adb96c082cd94ec0c72c62556b4fde1e05c Mon Sep 17 00:00:00 2001
From: wangmengc <wangmengc@uniontech.com>
Date: Fri, 13 Dec 2024 17:15:50 +0800
Subject: [PATCH] fix echo {a..z}
---
r_braces/src/lib.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/r_braces/src/lib.rs b/r_braces/src/lib.rs
index ee83ac1..d36ff1f 100644
--- a/r_braces/src/lib.rs
+++ b/r_braces/src/lib.rs
@@ -378,7 +378,7 @@ pub unsafe extern "C" fn brace_expand(
loop {
if *amble.offset(j as isize) as libc::c_int == 0 as libc::c_int {
tack = expand_seqterm (amble, alen);
- if tack.is_null() {
+ if !tack.is_null() {
break;
}
else if !text.offset((i+1) as isize).is_null() {
@@ -692,7 +692,9 @@ unsafe extern "C" fn expand_seqterm(
lhs = substring(text, 0 as libc::c_int, lhs_l);
rhs = substring(
text,
- (lhs_l + std::mem::size_of::<[libc::c_char; 3]> as libc::c_int - 1 as libc::c_int ),
+ (lhs_l as libc::c_ulong)
+ .wrapping_add(::std::mem::size_of::<[libc::c_char; 3]>() as libc::c_ulong)
+ .wrapping_sub(1 as libc::c_int as libc::c_ulong) as libc::c_int,
tlen as libc::c_int,
);
if *lhs.offset(0 as libc::c_int as isize) as libc::c_int == 0 as libc::c_int
--
2.39.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。