The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


swprintf confusion
RobRendell Offline
Junior Member

Posts: 3
Threads: 1
Joined: May 2010
Reputation: 0
#1
swprintf confusion

Hi! Thanks for open-sourcing Penumbra: Overture... I was finding it crashed a lot when I downloaded it from the Humble Indy Bundle, so the opportunity to find and fix the issue(s) is very satisfying... the game looks great, and I'm looking forward to playing it in full Smile

I've found an issue that strikes me as odd. My debug build of Overture was failing to find/load any resources. I traced the problem into Impl/System/win32.cpp, where the function Platform::FindFileInDir makes a few calls to swprintf, e.g.:

swprintf(sSpec,256,_W("%s\\%s"),asDir.c_str(),asMask.c_str());

However, the version of swprintf my version of Visual Studio 2005 has doesn't take a size parameter... that's snwprintf. VS2005's swprint just takes the output string, format and args, without a size.

I've corrected them in my version and the game now loads and runs, but I don't really understand how this could have ever worked. Does swprintf sometimes take an "n" in some library versions or something?
05-17-2010, 01:09 PM
Find


Messages In This Thread
swprintf confusion - by RobRendell - 05-17-2010, 01:09 PM
RE: swprintf confusion - by Urkle - 05-17-2010, 02:25 PM
RE: swprintf confusion - by Urkle - 05-17-2010, 04:00 PM
RE: swprintf confusion - by RobRendell - 05-17-2010, 10:39 PM



Users browsing this thread: 1 Guest(s)