瀏覽代碼

Fix missing nul

Jeremy Soller 6 年之前
父節點
當前提交
dd65d0c0c8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/header/getopt/mod.rs

+ 1 - 1
src/header/getopt/mod.rs

@@ -88,7 +88,7 @@ pub unsafe extern "C" fn getopt_long(
                                         stdio::fputs(*argv as _, &mut *stdio::stderr);
                                         stdio::fputs(": option '--\0".as_ptr() as _, &mut *stdio::stderr);
                                         stdio::fputs(current_arg, &mut *stdio::stderr);
-                                        stdio::fputs("' requires an argument\n".as_ptr() as _, &mut *stdio::stderr);
+                                        stdio::fputs("' requires an argument\n\0".as_ptr() as _, &mut *stdio::stderr);
                                         return b'?' as c_int;
                                     }
                                 }