summary refs log tree commit diff
path: root/Src/Builtins
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Builtins')
-rw-r--r--Src/Builtins/rlimits.awk4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Builtins/rlimits.awk b/Src/Builtins/rlimits.awk
index 5542c6cef..d4a1db4a6 100644
--- a/Src/Builtins/rlimits.awk
+++ b/Src/Builtins/rlimits.awk
@@ -56,9 +56,9 @@ BEGIN {limidx = 0}
 }
 # in case of GNU libc
 /^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*RLIMIT_NLIMITS/ {
-    nlimits = limidx
+    if(!nlimits) { nlimits = limidx }
 }
-/^[\t ]*RLIM_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ {
+/^[\t ]*RLIMIT_NLIMITS[\t ]*=[\t ]*[0-9][0-9]*/ {
     limindex = index($0, "=")
     limtail = substr($0, limindex, 80)
     split(limtail, tmp)