anchor.diff:        IF (n_t_global == Turbine%p_FAST%n_TMax_m1 + 1) THEN  ! we call update an extra time in Simulink, which we can ignore until the time shift with outputs is solved
            n_t_global = n_t_global + 1
            ErrStat_c = ErrID_None
  -         ErrMsg_c = TRANSFER( C_NULL_CHAR, ErrMsg_c )
  +         ErrMsg = C_NULL_CHAR
  +         ErrMsg_c = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
         ELSE     
            ErrStat_c = ErrID_Info
  -         ErrMsg_c  = TRANSFER( "Simulation completed."//C_NULL_CHAR, ErrMsg_c )
  +         ErrMsg = "Simulation completed."//C_NULL_CHAR
  +         ErrMsg_c = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
         END IF
         
      ELSEIF(NumOutputs_c /= SIZE(Turbine%y_FAST%ChannelNames) ) THEN
         ErrStat_c = ErrID_Fatal
  -      ErrMsg_c  = TRANSFER( "FAST_Update:size of OutputAry is invalid or FAST has too many outputs."//C_NULL_CHAR, ErrMsg_c )
  +      ErrMsg    = "FAST_Update:size of OutputAry is invalid or FAST has too many outputs."//C_NULL_CHAR
  +      ErrMsg_c  = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
         RETURN
      ELSEIF(  NumInputs_c /= NumFixedInputs .AND. NumInputs_c /= NumFixedInputs+3 ) THEN
         ErrStat_c = ErrID_Fatal
  -      ErrMsg_c  = TRANSFER( "FAST_Update:size of InputAry is invalid."//C_NULL_CHAR, ErrMsg_c )
  +      ErrMsg    = "FAST_Update:size of InputAry is invalid."//C_NULL_CHAR
  +      ErrMsg_c  = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
         RETURN
      ELSE
   
  
positive.code:       IF (n_t_global == Turbine%p_FAST%n_TMax_m1 + 1) THEN  ! we call update an extra time in Simulink, which we can ignore until the time shift with outputs is solved
           n_t_global = n_t_global + 1
           ErrStat_c = ErrID_None
           ErrMsg_c = TRANSFER( C_NULL_CHAR, ErrMsg_c )
        ELSE     
           ErrStat_c = ErrID_Info
           ErrMsg_c  = TRANSFER( "Simulation completed."//C_NULL_CHAR, ErrMsg_c )
        END IF
        
     ELSE
  
negative.code:       n_t_global = n_t_global + 1
              
        ErrStat_c = ErrStat
        ErrMsg = TRIM(ErrMsg)//C_NULL_CHAR
        ErrMsg_c  = TRANSFER( ErrMsg//C_NULL_CHAR, ErrMsg_c )
     END IF
     
        
  