• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision4a5534fc807e07e5ffd314099ff90fce0b2f4566 (tree)
Zeit2024-03-30 11:38:10
AutorFs <Fsu0413@vip....>
CommiterFs

Log Message

sort keys

Ändern Zusammenfassung

Diff

--- a/Compile/lib/Generate.lua
+++ b/Compile/lib/Generate.lua
@@ -1031,7 +1031,16 @@ end
10311031
10321032 gen.dumpConfTable = function(self, para)
10331033 local returnText = "{\n"
1034- for k, v in pairs(para) do
1034+ local keys = {}
1035+
1036+ for k in pairs(para) do
1037+ table.insert(keys, k)
1038+ end
1039+
1040+ table.sort(keys)
1041+
1042+ for _, k in ipairs(keys) do
1043+ local v = para[k]
10351044 -- key is always string
10361045 returnText = returnText .. "[\"" .. k .. "\"] = "
10371046 if type(v) == "nil" then