@@ -298,7 +298,7 @@ typedef struct {
298
298
#define HEADER_LENGTH 11
299
299
300
300
#define MAJOR_VERSION 2
301
- #define MINOR_VERSION 55
301
+ #define MINOR_VERSION 56
302
302
303
303
typedef enum {
304
304
CMD_SET_VM = 1 ,
@@ -6976,6 +6976,12 @@ get_types_for_source_file (gpointer key, gpointer value, gpointer user_data)
6976
6976
}
6977
6977
}
6978
6978
6979
+ static void add_error_string (Buffer * buf , const char * str )
6980
+ {
6981
+ if (CHECK_PROTOCOL_VERSION (2 , 56 ))
6982
+ buffer_add_string (buf , str );
6983
+ }
6984
+
6979
6985
static ErrorCode
6980
6986
vm_commands (int command , int id , guint8 * p , guint8 * end , Buffer * buf )
6981
6987
{
@@ -7280,7 +7286,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
7280
7286
ignore_case = decode_byte (p , & p , end );
7281
7287
7282
7288
if (!mono_reflection_parse_type_checked (name , & info , error )) {
7283
- buffer_add_string (buf , mono_error_get_message (error ));
7289
+ add_error_string (buf , mono_error_get_message (error ));
7284
7290
mono_error_cleanup (error );
7285
7291
g_free (name );
7286
7292
mono_reflection_free_type_info (& info );
@@ -7791,7 +7797,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
7791
7797
g_free (s );
7792
7798
mono_domain_set_fast (d , TRUE);
7793
7799
char * error_msg = g_strdup_printf ("Unexpected assembly-qualified type %s was provided" , original_s );
7794
- buffer_add_string (buf , error_msg );
7800
+ add_error_string (buf , error_msg );
7795
7801
g_free (error_msg );
7796
7802
g_free (original_s );
7797
7803
return ERR_INVALID_ARGUMENT ;
@@ -7803,7 +7809,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
7803
7809
g_free (s );
7804
7810
mono_domain_set_fast (d , TRUE);
7805
7811
char * error_msg = g_strdup_printf ("Invalid type name %s" , original_s );
7806
- buffer_add_string (buf , error_msg );
7812
+ add_error_string (buf , error_msg );
7807
7813
g_free (error_msg );
7808
7814
g_free (original_s );
7809
7815
return ERR_INVALID_ARGUMENT ;
@@ -7869,7 +7875,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
7869
7875
error_init (error );
7870
7876
MonoClass * mono_class = mono_class_get_checked (ass -> image , token , error );
7871
7877
if (!is_ok (error )) {
7872
- buffer_add_string (buf , mono_error_get_message (error ));
7878
+ add_error_string (buf , mono_error_get_message (error ));
7873
7879
mono_error_cleanup (error );
7874
7880
return ERR_INVALID_ARGUMENT ;
7875
7881
}
@@ -7886,7 +7892,7 @@ assembly_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
7886
7892
error_init (error );
7887
7893
MonoMethod * mono_method = mono_get_method_checked (ass -> image , token , NULL , NULL , error );
7888
7894
if (!is_ok (error )) {
7889
- buffer_add_string (buf , mono_error_get_message (error ));
7895
+ add_error_string (buf , mono_error_get_message (error ));
7890
7896
mono_error_cleanup (error );
7891
7897
return ERR_INVALID_ARGUMENT ;
7892
7898
}
@@ -8739,7 +8745,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
8739
8745
8740
8746
header = mono_method_get_header_checked (method , error );
8741
8747
if (!header ) {
8742
- buffer_add_string (buf , mono_error_get_message (error ));
8748
+ add_error_string (buf , mono_error_get_message (error ));
8743
8749
mono_error_cleanup (error ); /* FIXME don't swallow the error */
8744
8750
return ERR_INVALID_ARGUMENT ;
8745
8751
}
@@ -9571,7 +9577,7 @@ string_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
9571
9577
if (!is_ok (error )) {
9572
9578
if (s )
9573
9579
g_free (s );
9574
- buffer_add_string (buf , mono_error_get_message (error ));
9580
+ add_error_string (buf , mono_error_get_message (error ));
9575
9581
return ERR_INVALID_ARGUMENT ;
9576
9582
}
9577
9583
buffer_add_string (buf , s );
0 commit comments