Changeset - r16578:cef5370aef8a
[Not reviewed]
master
0 1 0
smatz - 14 years ago 2010-11-25 13:41:30
smatz@openttd.org
(svn r21318) -Fix: parameters to ShowErrorMessage() were swapped when content download failed
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/network/network_content.cpp
Show inline comments
 
@@ -445,7 +445,7 @@ DEF_CONTENT_RECEIVE_COMMAND(Client, PACK
 
		size_t toRead = (size_t)(p->size - p->pos);
 
		if (fwrite(p->buffer + p->pos, 1, toRead, this->curFile) != toRead) {
 
			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 
			ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, WL_ERROR);
 
			ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, WL_ERROR);
 
			this->Close();
 
			fclose(this->curFile);
 
			this->curFile = NULL;
 
@@ -479,7 +479,7 @@ bool ClientNetworkContentSocketHandler::
 
		if (filename == NULL) {
 
			/* Unless that fails ofcourse... */
 
			DeleteWindowById(WC_NETWORK_STATUS_WINDOW, 0);
 
			ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, WL_ERROR);
 
			ShowErrorMessage(STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD, STR_CONTENT_ERROR_COULD_NOT_DOWNLOAD_FILE_NOT_WRITABLE, WL_ERROR);
 
			return false;
 
		}
 

	
0 comments (0 inline, 0 general)