bug fix: last address bytes were not displayed correctly (signed)

This commit is contained in:
fros4943 2009-04-28 07:29:26 +00:00
parent eec984dfe3
commit 3aac9a49ce
2 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: IPAddress.java,v 1.4 2009/04/20 16:12:37 fros4943 Exp $
* $Id: IPAddress.java,v 1.5 2009/04/28 07:29:26 fros4943 Exp $
*/
package se.sics.cooja.interfaces;
@ -98,7 +98,7 @@ public class IPAddress extends MoteInterface {
for (int i=0; i < 3; i++) {
ipString += (0xFF & ip[i]) + ".";
}
ipString += ip[3];
ipString += (0xFF & ip[3]);
return ipString;
} else if (isVersion6()) {
String ipString = "";

View File

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: RimeAddress.java,v 1.1 2009/04/20 16:13:11 fros4943 Exp $
* $Id: RimeAddress.java,v 1.2 2009/04/28 07:29:26 fros4943 Exp $
*/
package se.sics.cooja.interfaces;
@ -88,7 +88,7 @@ public class RimeAddress extends MoteInterface {
for (int i=0; i < RIME_ADDR_LENGTH-1; i++) {
addrString += (0xFF & addr[i]) + ".";
}
addrString += addr[RIME_ADDR_LENGTH-1];
addrString += (0xFF & addr[RIME_ADDR_LENGTH-1]);
return addrString;
}