Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17063

scriptfilesystem copy file bug fix (posix)

$
0
0

Hi,

I have noticed a typo in the POSIX version of the copyfile function in the filesystem add-on, which actually causes a bug (files are not copied). Please find below a fix (line numbers may not match as I am still on the previous version of Angelscript without the date functions):

--- scriptfilesystem.cpp	(revision original)
+++ scriptfilesystem.cpp	(revision fixed)
@@ -452,7 +452,7 @@
 	FILE *src = 0, *tgt = 0;
 	src = fopen(search1.c_str(), "r");
 	if (src == 0) failure = true;
-	if( !failure ) tgt - fopen(search2.c_str(), "w");
+	if( !failure ) tgt = fopen(search2.c_str(), "w");
 	if (tgt == 0) failure = true;
 	char buf[1024 …

Viewing all articles
Browse latest Browse all 17063

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>