2025-07-27 09:41 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000574Spring engineGeneralpublic2012-06-27 02:29
Reportersemi 
Assigned Toabma 
PrioritynormalSeveritytrivialReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0000574: [patch] spring /V (or -V and couple others) returns -1 always
DescriptionIf you request spring it's version number, help text or projectiledump, after giving those correctly, spring returns with -1 as it's return value.

Spring should return with 0 to indicate no failure, since there has not been a failure.

I checked the path from handling these things to program end, and it is just a chain of returns.

My patch makes spring return with 0 in these cases. This way lobbies can actually see if something really failed when they test for the version number.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • diff file icon spring_no_phail_on_version_query.diff (657 bytes) 2007-07-31 23:05 -
    Index: rts/System/Main.cpp
    ===================================================================
    --- rts/System/Main.cpp	(revision 4113)
    +++ rts/System/Main.cpp	(working copy)
    @@ -658,13 +658,13 @@
     	// mutually exclusive options that cause spring to quit immediately
     	if (cmdline->result("help")) {
     		cmdline->usage("Spring",VERSION_STRING);
    -		return false;
    +		exit(0);
     	} else if (cmdline->result("version")) {
     		std::cout << "Spring " << VERSION_STRING << std::endl;
    -		return false;
    +		exit(0);
     	} else if (cmdline->result("projectiledump")) {
     		CCustomExplosionGenerator::OutputProjectileClassInfo();
    -		return false;
    +		exit(0);
     	}
     
     	// flags
    
    diff file icon spring_no_phail_on_version_query.diff (657 bytes) 2007-07-31 23:05 +

-Relationships
+Relationships

-Notes

~0001045

Auswaschbar (reporter)

commited to r4134

Thanks
+Notes

-Issue History
Date Modified Username Field Change
2007-07-31 23:05 semi New Issue
2007-07-31 23:05 semi File Added: spring_no_phail_on_version_query.diff
2007-08-04 14:02 Auswaschbar Note Added: 0001045
2007-08-04 14:32 trepan Status new => resolved
2012-06-27 02:27 abma Status resolved => assigned
2012-06-27 02:27 abma Assigned To => abma
2012-06-27 02:29 abma Status assigned => resolved
2012-06-27 02:29 abma Resolution open => fixed
+Issue History