* Gonzalo Paniagua Javier (gonzalo@ximian.com)
*
* Copyright (C) 2005-2009 Novell, Inc. (http://www.novell.com)
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#if defined(__native_client__)
#include "console-null.c"
MonoBoolean
ves_icall_System_ConsoleDriver_TtySetup (MonoString *keypad, MonoString *teardown, MonoArray **control_chars, int **size)
{
+ MonoError error;
+
int dims;
dims = terminal_get_dimensions ();
/* 17 is the number of entries set in set_control_chars() above.
* NCCS is the total size, but, by now, we only care about those 17 values*/
- mono_gc_wbarrier_generic_store (control_chars, (MonoObject*) mono_array_new (mono_domain_get (), mono_defaults.byte_class, 17));
+ MonoArray *control_chars_arr = mono_array_new_checked (mono_domain_get (), mono_defaults.byte_class, 17, &error);
+ if (mono_error_set_pending_exception (&error))
+ return FALSE;
+ mono_gc_wbarrier_generic_store (control_chars, (MonoObject*) control_chars_arr);
if (tcgetattr (STDIN_FILENO, &initial_attr) == -1)
return FALSE;