Просмотр исходного кода

Fix variable "used uninitialized" warnings

- Gave a default address of localhost. Not sure if that's
  desirable but I figured if we're going to pretend nothing
  went wrong we might as well give it a valid address.
Nur Monson 12 лет назад
Родитель
Сommit
c573948cf6
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      Core/Contents/Source/PolySocket.cpp

+ 4 - 1
Core/Contents/Source/PolySocket.cpp

@@ -53,7 +53,10 @@ void Address::setAddress(unsigned int ip, unsigned int port) {
 }
 
 void Address::setAddress(String ipAsString, unsigned int port) {
-	unsigned int a,b,c,d;
+	unsigned int a = 127;
+	unsigned int b = 0;
+	unsigned int c = 0;
+	unsigned int d = 1;
 	
 	vector<String> values = ipAsString.split(".");
 	if(values.size() == 4) {