The code below shows the problem. The lines labeled "STMT A" though "STMT E" are the ones in question. Comment out all except one of them and run the translated program. The application works for STMTs A through D, but not E. In that case, it crashes the application.
function xyzzy(sequence x)
return x & x
end function
procedure foo(sequence bar)
object envvar
object val
envvar = bar[1 ..$]
--envvar = getenv(bar[1 ..$]) -- STMT A
--envvar = getenv(envvar & "") -- STMT B
--val = getenv(envvar) -- STMT C
--envvar = xyxxy(envvar) -- STMT D
envvar = getenv(envvar) -- STMT E
end procedure
foo("eudir")
This looks like an old bug. Interesting that it wasn't found until now. opGETENV wasn't using CSaveStr correctly.
Works now.