From 503a79f19a34cbf85842d5e3bf84a9a08d461689 Mon Sep 17 00:00:00 2001 From: ElNounch Date: Sun, 14 Aug 2016 13:11:52 +0200 Subject: Typo in IniFile:GetNumKeys() code sample (#3317) --- Server/Plugins/APIDump/APIDesc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 40bda49d7..77b61cb6d 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -1236,10 +1236,10 @@ end local IniFile = cIniFile(); IniFile:ReadFile("somefile.ini") local NumKeys = IniFile:GetNumKeys(); -for k = 0, NumKeys do +for k = 0, (NumKeys - 1) do local NumValues = IniFile:GetNumValues(k); LOG("key \"" .. IniFile:GetKeyName(k) .. "\" has " .. NumValues .. " values:"); - for v = 0, NumValues do + for v = 0, (NumValues - 1) do LOG(" value \"" .. IniFile:GetValueName(k, v) .. "\"."); end end -- cgit v1.2.3