Skip to content

Commit f7a1290

Browse files
committed
* RingFetch example: Fix type conversion for package count
1 parent f59bf14 commit f7a1290

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/24_ringfetch.ring

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func loadFetchHTML()
611611
# Handles requests from JavaScript to get all system data.
612612
func handleGetSystemData(id, req)
613613
aData = buildSystemDataList()
614-
cJson = list2json(aData)
614+
cJson = substr(list2json(aData), char(13), "")
615615
oWebView.wreturn(id, WEBVIEW_ERROR_OK, cJson)
616616

617617
# --- Helper Functions ---
@@ -629,7 +629,7 @@ func buildSystemDataList()
629629
cUptime = sys.sysUptime([])
630630
cShell = sys.shell()[:name] + " " + sys.shell()[:version]
631631
cPackages = sys.packageManager()
632-
cPackages = cPackages[:count] + " ("+cPackages[:name]+")"
632+
cPackages = string(cPackages[:count]) + " ("+cPackages[:name]+")"
633633

634634
# --- Hardware Information ---
635635
oCPU = sys.cpu([:usage = 1])

0 commit comments

Comments
 (0)