From 7d75b4524040ba87b31d002a241c16a59f45d115 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Fri, 16 Oct 2026 18:34:34 +0200 Subject: [PATCH] compile-glsl.ps1: a function with no parameters is called with no arguments The wrapper built one empty argument for an empty parameter list, so cultmath_site_cells_empty() failed glslang. Co-Authored-By: Claude Sonnet 5.5 --- packages/cultmath/tools/compile-glsl.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cultmath/tools/compile-glsl.ps1 b/packages/cultmath/tools/compile-glsl.ps1 index 8ec2b82c..820feaf4 100644 --- a/packages/cultmath/tools/compile-glsl.ps1 +++ b/packages/cultmath/tools/compile-glsl.ps1 @@ -42,7 +42,7 @@ function Get-Zero([string]$type) { return "$type(0.0)" } $calls = foreach ($match in [regex]::Matches($library, '(?m)^\w+\s+(cultmath_\w+)\s*\(([^)]*)\)')) { - $arguments = foreach ($parameter in ($match.Groups[2].Value -split ',')) { + $arguments = foreach ($parameter in ($match.Groups[2].Value -split ',' | Where-Object { $_.Trim() })) { Get-Zero (($parameter.Trim() -split '\s+')[0]) } " $($match.Groups[1].Value)($($arguments -join ', '));"