mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 17:08:00 +02:00
Correctly handle null in Write
/WriteLine
This commit is contained in:
parent
3dd4212ccd
commit
06bc73976f
1 changed files with 8 additions and 2 deletions
|
@ -221,7 +221,10 @@ namespace System
|
|||
public static void Write(Object obj)
|
||||
{
|
||||
String str = scope String(256);
|
||||
obj.ToString(str);
|
||||
if (obj == null)
|
||||
str.Append("null");
|
||||
else
|
||||
obj.ToString(str);
|
||||
Write(str);
|
||||
}
|
||||
|
||||
|
@ -245,7 +248,10 @@ namespace System
|
|||
public static void WriteLine(Object obj)
|
||||
{
|
||||
String str = scope String(256);
|
||||
obj.ToString(str);
|
||||
if (obj == null)
|
||||
str.Append("null");
|
||||
else
|
||||
obj.ToString(str);
|
||||
WriteLine(str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue