5 Star 0 Fork 6

src-openEuler/utshell

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0006-fix-select-error.patch 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
wangmengc 提交于 2024-05-09 11:09 . fix select error
From e7dfff81605834dcc6b879963d820c60aef972b0 Mon Sep 17 00:00:00 2001
From: wangmengc <[email protected]>
Date: Thu, 9 May 2024 10:58:58 +0800
Subject: [PATCH] fix select error
---
builtins_rust/read/src/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtins_rust/read/src/lib.rs b/builtins_rust/read/src/lib.rs
index d08da49..de8bbd8 100644
--- a/builtins_rust/read/src/lib.rs
+++ b/builtins_rust/read/src/lib.rs
@@ -770,10 +770,10 @@ pub extern "C" fn r_read_builtin(mut list: *mut WordList) -> i32 {
//和-d相关 -n 0可以退出,有显示
if saw_escape != 0 {
let t = dequote_string(input_string);
- var = bind_variable("REPLY".as_ptr() as *const c_char, t, 0);
+ var = bind_variable( b"REPLY\0" as *const u8 as *const libc::c_char,t, 0);
libc::free(t as *mut c_void);
} else {
- var = bind_variable("REPLY".as_ptr() as *const c_char, input_string, 0);
+ var = bind_variable( b"REPLY\0" as *const u8 as *const libc::c_char,input_string, 0);
}
let cond = var.is_null()
|| ((*var).attributes & 0x0000002) != 0
--
2.39.3
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/utshell.git
[email protected]:src-openeuler/utshell.git
src-openeuler
utshell
utshell
master

搜索帮助