mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-05-30 18:16:31 +03:00
Some minor fixes in URI and http_request demo.
Fixed a crash in UIDropDownList. Some fixes in all UILayouts.
This commit is contained in:
@@ -150,7 +150,8 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
|
||||
totalBytes != currentBytes )
|
||||
return true;
|
||||
tickElapsed.restart();
|
||||
double progress = currentBytes / static_cast<double>( totalBytes );
|
||||
double progress =
|
||||
totalBytes > 0 ? currentBytes / static_cast<double>( totalBytes ) : 0;
|
||||
Time eta( elapsed.getElapsedTime() / progress - elapsed.getElapsedTime() );
|
||||
int percent = static_cast<int>( eefloor( progress * 100. ) );
|
||||
std::string bytesProgress( String::format(
|
||||
@@ -194,7 +195,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
|
||||
httpProxy = proxy.Get();
|
||||
}
|
||||
|
||||
if ( httpProxy.find( "://" ) == std::string::npos ) {
|
||||
if ( !httpProxy.empty() && httpProxy.find( "://" ) == std::string::npos ) {
|
||||
httpProxy = "http://" + httpProxy;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user