Type corrections

This commit is contained in:
Tristan B. Kildaire 2020-10-05 17:59:40 +02:00
parent b115634849
commit 6837d290bd
2 changed files with 4 additions and 13 deletions

View File

@ -7,15 +7,6 @@ import std.exception;
void main(string[] args)
{
uint i = -1;
long k = i;
writeln(cast(ulong)k);
// byte d = 1;
// d = d==1;
/* Configuration file */
string configFilename;

View File

@ -290,8 +290,8 @@ public class DConnection : Thread
ubyte usernameLength = message.data[1];
/* Get the username and password */
string username = cast(string)message.data[2..cast(ulong)2+cast(ulong)usernameLength];
string password = cast(string)message.data[cast(ulong)2+cast(uint)usernameLength..message.data.length];
string username = cast(string)message.data[2..2+cast(uint)usernameLength];
string password = cast(string)message.data[2+cast(uint)usernameLength..message.data.length];
/* Authenticate */
bool status = authenticate(username, password);
@ -421,10 +421,10 @@ public class DConnection : Thread
ubyte locationLength = message.data[2];
/* Get the channel/person name */
string destination = cast(string)message.data[3..3UL+cast(uint)locationLength];
string destination = cast(string)message.data[3..3+cast(uint)locationLength];
/* Get the message */
string msg = cast(string)message.data[3UL+cast(uint)locationLength..message.data.length];
string msg = cast(string)message.data[3+cast(uint)locationLength..message.data.length];
/* Send status */
bool sendStatus;