mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 08:49:50 +00:00
core/graph: fix a regression where dots are printed out of node
This commit is contained in:
parent
261dd145d9
commit
316a529a80
@ -213,10 +213,10 @@ static void normal_ANode_print(const AGraph *g, const ANode *n, int cur) {
|
||||
n->y + MARGIN_TEXT_Y + delta_y + center_y - delta_txt_y)) {
|
||||
unsigned int text_x = center_x >= delta_x ? 0 : delta_x - center_x;
|
||||
unsigned int text_y = center_y >= delta_y ? 0 : delta_y - center_y;
|
||||
unsigned int text_h = BORDER_HEIGHT >= n->h ? 0 : n->h - BORDER_HEIGHT;
|
||||
unsigned int text_h = BORDER_HEIGHT >= n->h ? 1 : n->h - BORDER_HEIGHT;
|
||||
|
||||
if (g->zoom < ZOOM_DEFAULT) text_h--;
|
||||
if (text_y <= text_h - 1) {
|
||||
if (text_y + 1 <= text_h) {
|
||||
text = r_str_crop (n->text,
|
||||
text_x, text_y,
|
||||
n->w - BORDER_WIDTH,
|
||||
|
@ -480,7 +480,7 @@ R_API const char *r_str_pad(const char ch, int len);
|
||||
R_API const char *r_str_rchr(const char *base, const char *p, int ch);
|
||||
R_API const char *r_str_closer_chr (const char *b, const char *s);
|
||||
R_API int r_str_bounds(const char *str, int *h);
|
||||
R_API char *r_str_crop(const char *str, int x, int y, int w, int h);
|
||||
R_API char *r_str_crop(const char *str, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
R_API int r_str_len_utf8 (const char *s);
|
||||
R_API int r_str_len_utf8char (const char *s, int left);
|
||||
R_API void r_str_filter_zeroline(char *str, int len);
|
||||
|
@ -1706,9 +1706,9 @@ R_API int r_str_bounds(const char *_str, int *h) {
|
||||
}
|
||||
#endif
|
||||
|
||||
R_API char *r_str_crop(const char *str, int x, int y, int w, int h) {
|
||||
R_API char *r_str_crop(const char *str, unsigned int x, unsigned int y, unsigned int w, unsigned int h) {
|
||||
char *r, *ret;
|
||||
int ch = 0, cw = 0;
|
||||
unsigned int ch = 0, cw = 0;
|
||||
if (w<1 || h<1)
|
||||
return strdup ("");
|
||||
r = ret = strdup (str);
|
||||
|
Loading…
Reference in New Issue
Block a user